DB2恢復(fù)刪除表的實(shí)際操作技巧演示
以下的文章向大家描述的是在DB2恢復(fù)刪除表的實(shí)際操作技巧,在實(shí)際操作中DB2數(shù)據(jù)庫(kù)在歷史文件中保存了備份,恢復(fù),以及裝載數(shù)據(jù)與刪除表等操作. 假設(shè)數(shù)據(jù)庫(kù)名為sample, 您可以用下面的命令列出刪除表的記錄:
- db2 "list history dropped table all for sample"
下一步是從以前的備份中恢復(fù)刪除表所在的表空間, 備份所在的目錄是c:\db2backup. without rolling forward指明不需要前滾.
- db2 "restore db sample tablespace(userspace1) from c:\db2backup taken at 20041102100931 without rolling forward without prompting"
第三步是把所刪除表的數(shù)據(jù)卸載到某一目錄中
- db2 "rollforward db sample to end of logs and complete recover dropped table 00000000000002010002000d to c:\db2backup"
第四步是用歷史文件中保留的該表的DDL語(yǔ)句重建該表
第五步是重新裝載數(shù)據(jù)到該表. p(1,2)表明裝載該表的***個(gè)和第二個(gè)字段的內(nèi)容. recoverme是表名
- db2 "load from c:\db2backup\node0000\data OF DEL METHOD p(1,2) insert into recoverme"
以上的相關(guān)內(nèi)容就是對(duì)DB2恢復(fù)刪除表技巧的介紹,望你能有所收獲。
上述的相關(guān)內(nèi)容就是對(duì)DB2恢復(fù)刪除表技巧的描述,希望會(huì)給你帶來(lái)一些幫助在此方面。
【編輯推薦】