DB2 database recovery goes well

Source: Internet
Author: User

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:

 
 
  1. 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;  
  2. SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");  
  3. SET TABLESPACE CONTAINERS FOR 1 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00004\SQLT0001.0");  
  4. SET TABLESPACE CONTAINERS FOR 2 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");  
  5. SET TABLESPACE CONTAINERS FOR 3 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\TSASNCA03" 512000,

    FILE "C:\DB2\NODE0000\SQL00003\TSASNCA01" 512000);  
  6. SET TABLESPACE CONTAINERS FOR 4 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\TSASNUOW" 5888);  
  7. SET TABLESPACE CONTAINERS FOR 5 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "D:\DBFILES\TSETC.01");  
  8. SET TABLESPACE CONTAINERS FOR 6 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (FILE "C:\DB2\NODE0000\SQL00003\CDA35_SYSTEMPARA" 512);  
  9. SET TABLESPACE CONTAINERS FOR 7 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");  
  10. SET TABLESPACE CONTAINERS FOR 8 IGNORE ROLLFORWARD CONTAINER OPERATIONS USING (PATH "C:\DB2\NODE0000\SQL00003");  
  11. 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);  
  12. RESTORE DATABASE T_CENTER CONTINUE; 

With the help of Guan Wei of express connect, the program was adjusted:

 
 
  1. RESTORE DATABASE T_CENTER FROM "E:\T_CENTER" TAKEN AT 20091231124541 TO "C:"   
  2. INTO T_CENTER WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1 WITHOUT PROMPTING;  
  3. SET TABLESPACE CONTAINERS FOR 0 USING (PATH "D:\T_CENTER\tablespace\0");  
  4. SET TABLESPACE CONTAINERS FOR 1 USING (PATH "D:\T_CENTER\tablespace\1");  
  5. SET TABLESPACE CONTAINERS FOR 2 USING (PATH "D:\T_CENTER\tablespace\2");  
  6. SET TABLESPACE CONTAINERS FOR 3 USING (FILE "D:\T_CENTER\TSASNCA03" 16500000);  
  7. SET TABLESPACE CONTAINERS FOR 4 USING (FILE "D:\T_CENTER\TSASNUOW" 5888);  
  8. SET TABLESPACE CONTAINERS FOR 5 USING (PATH "D:\T_CENTER\tablespace\5");  
  9. SET TABLESPACE CONTAINERS FOR 6 USING (FILE "D:\T_CENTER\CDA35_SYSTEMPARA" 512);  
  10. SET TABLESPACE CONTAINERS FOR 7 USING (PATH "D:\T_CENTER\tablespace\7");  
  11. SET TABLESPACE CONTAINERS FOR 8 USING (PATH "D:\T_CENTER\tablespace\8");  
  12. SET TABLESPACE CONTAINERS FOR 9 USING (FILE "D:\T_CENTER\TSASNCA_LZJ" 1788000);  
  13. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.