DB2 9.5 online database backup is failing with "SQL2428N The BACKUP did not complete because one or more of the requested log files could not be retrieved."

Article: 100020095
Last Published: 2013-10-26
Ratings: 0 0
Product(s): NetBackup & Alta Data Protection

Problem

DB2 online database backup is failing with "SQL2428N The BACKUP did not complete because one or more of the requested log files could not be retrieved."
 

This problem is typically seen after either upgrading to DB2 9.5 (or higher) or changing the way that DB2 logs are backed up and retained on the client host.

Cause

Starting with DB2 version 9.5, the default behavior for a DB2 online database backup is to "include logs" as a part of the backup.   This means that any logs created since the last database backup occurred will be included in the current database backup.

If the logs have already been backed up and removed from the client host, then DB2 will either automatically restore the logs or fault if the logs cannot be restored.
 

Solution

This situation can be avoided several ways.

1) Specify "exclude logs" on the DB2 backup of the database.  This is the pre-9.5 DB2 syntax and will avoid backing up the logs which may have been previously backed up and deleted.  The syntax is as follows:

Change:
CMD_LINE="db2 BACKUP DATABASE $MY_DB2 ONLINE $MY_SCHED LOAD $MY_LIB OPEN 1 SESSIONS BUFFER 1024"

To: 
CMD_LINE="db2 BACKUP DATABASE $MY_DB2 ONLINE $MY_SCHED LOAD $MY_LIB OPEN 1 SESSIONS BUFFER 1024 EXCLUDE LOGS"

2) Avoid deleting the logs on the DB2 host until after the next database backup has completed successfully.

3) Alternatively, make sure the log backups go to a different storage unit and/or volume pool then the database backups.  Otherwise DB2 will pause the backup waiting for the logs to be restored.  If the needed logs were previously being backed up to the same media that the database is currently being backed up to, then the restore will hang waiting for the media.  Both jobs will remain deadlocked; the backup waiting for the logs to restore, the restore waiting for the media begin used for the backup.

 
 

Was this content helpful?