DB2恢復(fù)誤刪除表要用到的代碼示例
作者:佚名 
  我們今天主要向大家講述的是DB2恢復(fù)誤刪除表的正確操作步驟,此文章主要是通過其實際應(yīng)用代碼的方式來介紹其正確的操作步驟。
 此文章主要向大家描述的是DB2恢復(fù)誤刪除表的正確操作步驟,如果你對DB2恢復(fù)誤刪除表的正確操作步驟有興趣了解的話,以下的文章將會揭開它的神秘面紗。希望你在瀏覽完之后會有所收獲。
做了一次恢復(fù)誤刪除表的測試,具體過程如下:
- 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
 
以上的相關(guān)內(nèi)容就是對DB2恢復(fù)誤刪除表的介紹,望你能有所收獲。

上述的相關(guān)內(nèi)容就是對DB2恢復(fù)誤刪除表的描述,希望會給你帶來一些幫助在此方面。
【編輯推薦】
責(zé)任編輯:佚名 
                    來源:
                    52css.com
 














 
 
 


 
 
 
 