An Online Incremental backup of A DB2 server failed. The backup software used was 7.5. The specific error is as follows:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131229/2210234630-0.jpg "title =" nbu44.jpg "alt =" 172833126.jpg"/>
Nbu reports error 4. On Symantec's official website, the description of error 4 is
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131229/221023M15-1.jpg "title =" nbu .jpg "alt =" 173104282.jpg"/>
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: Severe
PID: 798772 TID: 1 PROC: db2agent (idle) 0
INSTANCE: db2inst2 NODE: 000 DB: PORTALDB
APPHDL: 0-490 APPID: * LOCAL. db2inst2.130619212231
AUTHID: DB2INST2
FUNCTION: DB2 UDB, database utilities, sqlubInitCheck, probe: 310
MESSAGE: SQL2426N The database has not been configured to allow
Incremental 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 trackmod
Track 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 logs
Db2 update db cfg using trackmod on; Enable Incremental Backup
Db2 update db cfg using userexit on; Enable User exit
Effect of changes:
$ Db2 update db cfg using trackmod on
DB20000I The update database configuration command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification
Were not changed dynamically. For these configuration parameters, all
Applications must disconnect from this database before the changes become
Valid tive.
That is to say, for these configuration parameters, the change takes effect only after all applications are disconnected from this database and 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 logs
Db2 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. node1_.catn1_.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.
This article from the "Drop water stone" blog, please be sure to keep this source http://xjsunjie.blog.51cto.com/999372/1343148