Case study of DB2 Online Incremental backup failure

Source: Internet
Author: User
One DB2 server Online Incremental backup failed. The backup software NETBACKUP7.5 was used. The specific error is as follows: nbu reports error No. 4. On Symantec's official website, the description of error No. 4 is that the solution provided is verification.

One DB2 server Online Incremental backup failed. The backup software NETBACKUP7.5 was used. The specific error is as follows: nbu reports error No. 4. On Symantec's official website, the description of error No. 4 is that the solution provided is verification.

An Online Incremental backup of A DB2 server failed. The backup software used was 7.5. The specific error is as follows:

The solution is to verify the permission and whether the file can be deleted. If you find the cause to solve the problem, you will be confused. This error is reported even if you set the permission to 777.

For another idea, check the DB2 db2diag. log. The log contains the following description:

2013-06-19-15.22.29.980017-360 E437909183A905     LEVEL: SeverePID     : 798772               TID  : 1           PROC : db2agent (idle) 0INSTANCE: db2inst2             NODE : 000         DB   : PORTALDBAPPHDL  : 0-490                APPID: *LOCAL.db2inst2.130619212231AUTHID  : DB2INST2FUNCTION: DB2 UDB, database utilities, sqlubInitCheck, probe:310MESSAGE : SQL2426N  The database has not been configured to allow theincremental backup operation. Reason code = "".

This information tells us that the database does not have the function of allowing Incremental backup, which must be enabled in DB2. In ORACLE, you can use RMAN to implement convenient incremental and differential backup.

Next, let's check the TRACKMOD parameters.

$ db2 get db cfg for portaldb|grep -i trackmodTrack modified pages                         (TRACKMOD) = OFF

It is found that this parameter is OFF, which is obviously the main cause of the failure of the DB2 Incremental backup.

Because we need to set tracemod to on for the Incremental backup of db2, the database will record the changed part pages on the physical page and Mark dirty. Enabling Incremental backup means that you do not need to back up an oversized database each time. it also means that you can restore the database to the State before the crash, instead of the State during the last backup, minimizing data loss.

To correctly set Incremental backup, you must pay attention to the following three parameters:

Db2 update db cfg using logretain on (or recovery); Enable archiving log db2 update db cfg using trackmod on; Enable Incremental backup function db2 update db cfg using userexit on; Enable User exit

These configuration parameters take effect only after all applications are disconnected from this database (db2 force applications all. In addition, after changing the parameters, the database is in the backup pending state. Before incremental and online backup, you must perform an offline full backup once to make the status normal.

Supplement: How does one perform online backup, Incremental backup, and differential backup?

Db2 backup db testdb online to backup path (online full backup) include logsdb2 backup db testdb online incremental to backup path (incremental backup) db2 backup db testdb online incremental delta to backup path (delta backup)

How can I use backup files for recovery?

1. Check the integrity of the backup file and verify whether the backup file is available.

db2ckbkp -h /db2logs/PORTALDB.0.db2inst2.NODE0000.CATN0000.20130619001007.001

2. Run the db2ckrst command to return the recommended required recovery command.

db2ckrst -d portaldb -r database -t 20130619001007

3. Execute the command sequence given by the previous command

db2 restore db portaldb incremental from /backup taken at 20130619001007 buffer 100

The database will be restored to the backup time, and then the log should be rolled forward (at this time, the database is in the pending state and will not be available)

db2 rollforward db portaldb to end of logs and complete

Of course, if you think that you do not need to roll back (this will lose the changes after the last backup), you can also

db2 rollforward db portaldb stop

With this knowledge, you can perform backup recovery in a correct and orderly manner to quickly and efficiently solve the problem.

The above is the analysis of the case study of Online Incremental backup failure in DB2. For more information, see PHP Chinese Network (www.php1.cn )!

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.