IT咨询服务Db2表空间db2故障

db2表空间恢复异常

1、在线备份表空间                backup database test tablespace(TBS_CMS_DAT) online to /home/db2inst1/backup                            &nb...显示全部

1、在线备份表空间

                backup database test tablespace(TBS_CMS_DAT) online to /home/db2inst1/backup

               

                时间戳记:20151021161045

        2、查看系统当前时间戳:

                db2 "select  current timestamp from sysibm.sysdummy1"

               

                1                        

--------------------------

2015-10-21-16.12.52.959919

  1 record(s) selected.

       

        3、删除一些数据

       

        4、恢复表空间

                connect to test

               

   Database Connection Information

Database server        = DB2/LINUXX8664 10.5.3

SQL authorization ID   = DB2INST1

Local database alias   = TEST

               

       

                restore database test tablespace(TBS_CMS_DAT) online from /home/db2inst1/backup

                taken at 20151021161045

               

               

        5、查看表空间状态

                rollforward database test query status tablespace(TBS_CMS_DAT)

               

                SQL1035N  The operation failed because the specified database cannot be connected to in the mode requested.  SQLSTATE=57019

       

        6、前滚到制定时间戳位置:(时间必须比系统当前时间戳大或者等于)

                rollforward database test to 2015-10-19-16.08.32 using local time and stop tablespace(TBS_CMS_DAT)

               

                SQL1035N  The operation failed because the specified database cannot be connected to in the mode requested.  SQLSTATE=57019

               

                 Tablespace ID                        = 4

Name                                 = TBS_CMS_DAT

Type                                 = Database managed space

Contents                             = All permanent data. Large table space.

State                                = 0x0080

   Detailed explanation:

     Roll forward pending

收起
参与6

查看其它 2 个回答inst1的回答

inst1inst1其它GD

补充一下,为什么能恢复,就是不能前滚,连状态都不能看

IT咨询服务 · 2015-10-21
浏览1801

回答者

inst1 最近回答过的问题

回答状态

  • 发布时间:2015-10-21
  • 关注会员:2 人
  • 回答浏览:1801
  • X社区推广