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.
- C: \ Documents ents and Settings \ Administrator> cd \
- C: \> db2 drop db TestDB
- The DB20000I drop database Command is successfully completed.
- C: \> db2 create db TestDB
- The DB20000I create database Command is successfully completed.
- 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
- 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.
- C:\>db2 backup db TestDB
The backup is successful. The time stamp of this backup image is: 20070419144951
- C:\>db2 connect to TestDB
Database connection information
Database Server = DB2/NT 8.2.0
SQL authorization id = ADMINIST...