文章主要向大家描述的是DB2數據庫復原的正確操作,此文章主要是描述其操作代碼來引出DB2數據庫復原的正確操作步驟,以下就是文章的主要內容的詳細描述,望大家在浏覽之後會對其有更深的了解。
數據庫數據庫
DB2數據庫復原支持的文件類型主要有三種:裸設備、path路徑、文件類型
一個表空間的大小不能超過64G.每個頁大小為4K.
有時候需要將數據庫架構放到數據庫的安裝目錄,而數據庫容器可以指定到其他地方。
昨天還原的原始命令為:
- RESTORE DATABASE T_CENTER FROM "E:\T_CENTER" TAKEN AT 20091231124541 TO "C:" INTO T_CENTER WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1 WITHOUT PROMPTING;
- SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");
- SET TABLESPACE CONTAINERS FOR 1 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00004\SQLT0001.0");
- SET TABLESPACE CONTAINERS FOR 2 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");
- SET TABLESPACE CONTAINERS FOR 3 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\TSASNCA03" 512000,FILE "C:\DB2\NODE0000\SQL00003\TSASNCA01" 512000);
- SET TABLESPACE CONTAINERS FOR 4 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\TSASNUOW" 5888);
- SET TABLESPACE CONTAINERS FOR 5 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "D:\DBFILES\TSETC.01");
- SET TABLESPACE CONTAINERS FOR 6 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\CDA35_SYSTEMPARA" 512);
- SET TABLESPACE CONTAINERS FOR 7 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");
- SET TABLESPACE CONTAINERS FOR 8 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");
- SET TABLESPACE CONTAINERS FOR 9 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\TSASNCA_LZJ" 768000,FILE "C:\DB2\NODE0000\SQL00003\TSASNCA01_LZJ" 512000,FILE "C:\DB2\NODE0000\SQL00003\TSASNCA02_LZJ" 512000);
- RESTORE DATABASE T_CENTER CONTINUE;
經過快通公司管偉的幫忙,將程序調整為:
- RESTORE DATABASE T_CENTER FROM "E:\T_CENTER" TAKEN AT 20091231124541 TO "C:"
- INTO T_CENTER WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1 WITHOUT PROMPTING;
- SET TABLESPACE CONTAINERS FOR 0 USING (PATH "D:\T_CENTER\tablespace\0");
- SET TABLESPACE CONTAINERS FOR 1 USING (PATH "D:\T_CENTER\tablespace\1");
- SET TABLESPACE CONTAINERS FOR 2 USING (PATH "D:\T_CENTER\tablespace\2");
- SET TABLESPACE CONTAINERS FOR 3 USING (FILE "D:\T_CENTER\TSASNCA03" 16500000);
- SET TABLESPACE CONTAINERS FOR 4 USING (FILE "D:\T_CENTER\TSASNUOW" 5888);
- SET TABLESPACE CONTAINERS FOR 5 USING (PATH "D:\T_CENTER\tablespace\5");
- SET TABLESPACE CONTAINERS FOR 6 USING (FILE "D:\T_CENTER\CDA35_SYSTEMPARA" 512);
- SET TABLESPACE CONTAINERS FOR 7 USING (PATH "D:\T_CENTER\tablespace\7");
- SET TABLESPACE CONTAINERS FOR 8 USING (PATH "D:\T_CENTER\tablespace\8");
- SET TABLESPACE CONTAINERS FOR 9 USING (FILE "D:\T_CENTER\TSASNCA_LZJ" 1788000);
- RESTORE DATABASE T_CENTER CONTINUE;
其中主要調整的地方一是容器路徑,另外一個是頁面的大小。
以上的相關內容就是對DB2數據庫復原的介紹,望你能有所收獲。