此文章主要向大家描述的是DB2恢复误删除表的正确操作步骤,如果你对DB2恢复误删除表的正确操作步骤有兴趣了解的话,以下的文章将会揭开它的神秘面纱。希望你在浏览完之后会有所收获。
做了一次恢复误删除表的测试,具体过程如下:
- DB2 ALTER TABLESPACE USERSPACE2 DROPPED TABLE RECOVERY ON
- DB2 "list history dropped table all for cdbiold"
- DB2 backup db cdbiold to /databk with 2 buffers buffer 512
- DB2 "delete from DC_BILL_STATUS where count_time='20080731'"
- DB2 drop table DC_BILL_STATUS
- DB2 "select TBSPACE,DROP_RECOVERY from syscat.tablespaces where owner='DB2ADMIN'"
- DB2 "list history dropped table all for cdbiold"
- Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
- D T 20090317165133 000000000039210b00020006
- "DB2ADMIN"."DC_BILL_STATUS" resides in 1 tablespace(s):
- 00001 USERSPACE1
- Comment: DROP TABLE
- Start Time: 20090317165133
- End Time: 20090317165133
- Status: A
- EID: 39
- DDL: CREATE TABLE "DB2ADMIN"."DC_BILL_STATUS" ( "COUNT_TIME" VARCHAR(8) NOT NULL ,
- "ORG_CODE" VARCHAR(8) NOT NULL , "BILL_TYPE" VARCHAR(40) NOT NULL , "FLAG" CHAR(1)
- NOT NULL WITH DEFAULT 'N' , "OPER" VARCHAR(64) NOT NULL WITH DEFAULT ' ' , "UP_FLAG" CHAR(1) NOT NULL WITH DEFAULT 'N' ) IN "USERSPACE1" ;
- DB2 force applications all
- DB2 restore db cdbiold from /databk taken at 20090317
- DB2 rollforward db cdbiold to end of logs and stop recover dropped table 000000000039210b00020006 to /databk
- DB2 "select count(*) from DC_BILL_STATUS where count_time='20080731'"
- DB2 import from /databk/NODE0000/data of del insert into DC_BILL_STATUS
以上的相关内容就是对DB2恢复误删除表的介绍,望你能有所收获。
上述的相关内容就是对DB2恢复误删除表的描述,希望会给你带来一些帮助在此方面。
【编辑推荐】