DB2 Online Incremental backup, restore Incremental backup, and perform rollback and recovery correctly

Source: Internet
Author: User
Tags db2 connect db2 connect to

The following articles mainly describe the actual operation steps of DB2 Online Incremental backup, restoration Incremental backup, and Rollback Recovery. The following describes the specific content. If you are curious, the following articles will unveil its mysteries.

Prerequisites for incremental DB2 backup:

1. Change the database parameter logretain, userexit, and trackmod to on2. After the parameter is changed, the database is backed up completely offline. 3. Online and Online Incremental Backup can be performed.

Note: prerequisites for Online Incremental Backup:

1. Change the database parameter logretain, userexit, and trackmod to on.

2. Change the parameters and back up the database offline once.

3. You can perform online and offline Incremental Backup in DB2.

The test result is passed. The script is as follows.

Important! The archived database logs must be backed up to another place on time. In this example, C: \ TESTDB.0 \ SQLOGDIR.

 
 
  1. C: \ Documents ents and Settings \ Administrator> cd \
  2. C: \> db2 drop db TestDB
  3. The DB20000I drop database Command is successfully completed.
  4. C: \> db2 create db TestDB
  5. The DB20000I create database Command is successfully completed.
  6. C: \> db2 connect to TestDB

Database connection information

Database Server = DB2/NT 8.2.0

SQL authorization id = ADMINIST...

Local Database alias = TESTDB

Modify database parameters to enable online backup

 
 
  1. C:\>db2 update db cfg using logretain on userexit on trackmod on 

The DB20000I update database configuration command is successfully completed.

One or more parameters submitted for immediate modification by SQL1363W are not dynamically changed. For these DB2 line Incremental Backup configuration parameters

After all applications are disconnected from this database, the changes take effect.

Before incremental and online backup, you must perform an offline full backup once.

 
 
  1. C:\>db2 backup db TestDB 

The backup is successful. The time stamp of this backup image is: 20070419144951

 
 
  1. C:\>db2 connect to TestDB 

Database connection information

Database Server = DB2/NT 8.2.0

SQL authorization id = ADMINIST...

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.