Troubleshooting
Problem
"Database ID does not match Extent probably for another database" error message in the db2diag.log running an online backup with the INCLUDE LOGS option.
Symptom
The following error message will be returned on a backup with the INCLUDE LOGS option, if there is a problem retrieving log files.
SQL2428N The BACKUP did not complete because one or more of the
requested log files could not be retrieved.
Further details of the problem can then be found in the db2diag.log
In one scenario, the db2diag.log may contain :
EDUID : 111 EDUNAME: db2logmgr (SAMPLE) 0
FUNCTION: DB2 UDB, data protection services, sqlpgRetrieveLogFile, probe:4150
RETCODE : ZRC=0x071000D6=118489302=SQLP_EXT_DBID_INCORR
"Database ID does not match Extent probably for another database."
This signifies that the log retrieved by the db2logmgr EDU had information about a different database in it's header.
Cause
One reason why multiple log chain directories may exist, is if there had previously been some database restore activity followed by a drop and create database statement. This does not remove the content of log archive directories and could hence lead to these problems.
Diagnosing The Problem
This could be the case if the db2logmgr had found a valid log file on a higher log chain in the log archive directory structure.
For example, if the current log chain is 0, a log would get archived to the directory pointed to by the LOGARCHMETH1 db cfg directory, appended by the <instance name>/<database name>/<db partitionnumber>/<chain number>
So when a log is full , it gets archived and the following message is written to the db2diag.log
FUNCTION: DB2 UDB, data protection services, sqlpgArchiveLogFile, probe:3180
MESSAGE : Completed archive for log file S0000069.LOG to
/striped/logs/db2inst2/SAMPLE/NODE0000/C0000000/ from
/home/db2inst2/db2inst2/NODE0000/SQL00001/SQLOGDIR/.
Now if there is an archive log directory with a higher chain number, for example chain 1, then the log retrieve mechanism will retrieve the log contained in the path with the highest log chain and you may see
FUNCTION: DB2 UDB, data protection services, sqlpgRetrieveLogFile, probe:4148
MESSAGE : Completed retrieve for log file S0000069.LOG on chain 1 to
/home/db2inst2/db2inst2/NODE0000/SQL00001/SQLOGDIR/.
This would have caused log 69 from log chain 1 to be copied back into the active log directory. This is the incorrect log , as the Archive log message stated it was archived to the directory for log chain 0.
This would lead to the "Database ID does not match Extent probably for another database" error.
Resolving The Problem
To fix this problem, one can easily remove or rename the incorrect log chain directory and restart the backup.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21450419