The correct procedure for the DB2 recovery command

Source: Internet
Author: User

The following articles mainly describe the actual operation steps of the DB2 recovery command. If you want to know the actual operation steps of the DB2 recovery command, the following articles will unveil its secrets. The following is a detailed description of the articles. I hope you can learn from them.

Command

Offline and online full backup and Incremental backup of DB2

1. Full offline backup

1) first, make sure that no user uses DB2:

$ DB2 list applications for db sample

2) Stop the database and restart it to disconnect all connections:

 
 
  1. DB2stop force  
  2. DB2start 

3) execute the BACKUP command: Use TSM as the backup media)

 
 
  1. DB2 backup db sample use tsm 

If the backup is successful, a timestamp is returned.

4) check that the backup is successful:

DB2 list history backup all for sample. You can see that this backup record is missing.

The return value can also be seen in the DB2adutl query command.

5) Remarks:

First, run the backup DB2 recovery command on the node where the catalog tablespace is located.

Command, and then perform this operation on another node.

2. Online backup:

1) First, open the database configuration parameters that support online backup:

DB2 update db cfg for sample using userexit on Enable User exit

DB2 update db cfg for sample using logretain on enable archiving logs

DB2 update db cfg for sample using trackmod on enable Incremental Backup

(Each Node must be set separately)

After these parameters are enabled, the database is in the backup pending state and requires offline full backup of the database. Perform full offline backup. Refer to the above command.

2) The online backup command is as follows:

 
 
  1. DB2 backup db sample online use tsm 

If the backup is successful, a timestamp is returned.

3) You can also use DB2adutl and DB2 list history to view backup records.

4) Remarks:

Similarly, this operation is performed on each node.

3. Online Incremental Backup

1) when three required parameters are enabled, perform Incremental Backup:

 
 
  1. DB2 backup db sample online incremental use tsm 

If the backup is successful, a timestamp is returned.

2) You can also use DB2adutl and DB2 list history to view backup records.

3) There is also a delta backup:

 
 
  1. DB2 backup db sample online incremental delta use tsm 

The difference between the two backups is similar to the Incremental and Cumulative modes of Oracle Exports. The incremental method of DB2 corresponds to the cumulative mode of oracle, while the delta mode of DB2 corresponds to the incremental mode of oracle.

4) Remarks:

Similarly, this operation is performed on each node.

The above content is an introduction to the DB2 recovery command. I hope you will get something better.

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.