This article mainly describes the correct operations for DB2 database restoration. This article mainly describes the operation code to introduce the correct operation steps for DB2 database restoration, the following is a detailed description of the main content of the article. I hope you will have a better understanding of it after browsing.
Database
DB2 database recovery supports three types of files: bare device, path, and file type.
The size of a tablespace cannot exceed 64 GB. The size of each page is 4 kb.
Sometimes you need to place the database architecture in the database installation directory, and the database container can be specified elsewhere.
The original command restored yesterday is:
- 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;
With the help of Guan Wei of express connect, the program was adjusted:
- 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;
The main adjustment is the container path and the page size.
The above content is an introduction to the restoration of the DB2 database. I hope you will get some benefits.