Skip to main content

DB2

The following section is intended to help you troubleshoot problems while operating DB2 database.

Topics


Library return codes

  • Symptom

Sometimes backup, restore or archiving process fails during library initialization.

  • Cause

A return code is immediately displayed by db2 command (you can read it from DB2 database trace too).

  • Solution

These are the most common return codes:

  • 10000 - There was a problem during source database autodiscover. This usually happens when you try to start a cxLink Backup process with a user account other than database administrator
  • 10004 - You are trying to start a restore session opening more I/O sessions than objects to restore from backup image
  • 10008 - Error initializing catalog file from filesystem
  • 10009 - You are trying to restore a backup image without specify the timestamp. Actual cxLink Backup release does not support this

  • Symptom

_10
SQL2062N An error occurred while accessing media "VENDOR". Reason code: "0".

  • Cause

This is probably because an error occurred transferring data to the configured provider. You can check this reading CxLink Backup log at /var/log/emory and looking for an error message like:


_10
... [sqluvput] Error transferring data cancelling session for <BACKUP_FILE> ...

If this is the case the most probably cause is a lack of resources due to db2bp orphan process.

  • Solution

Look for orphan db2bp processes, terminate them and restart backup again.

  • Symptom

Update process aparently did not update cxLink Backup library.

  • Cause

If you configured CxLink Backup as your DB2 archiving method, DB2 loads library once when archiving process begins to execute.

  • Solution

Restart DB2 archiving process to have DB2 loading the new version into memory.

DB2 recover/rollforward and not existing logs

  • Symptom

During a recover session or a rollforward after a restore session, DB2 keeps asking for not existing logs.

  • Cause

This is a well known DB2 issue; sometimes there is a problem initialising a vendor device, a SQLPLFR_RC_RETRIEVE_FAILED gets returned and recover or rollforward session fails.

Reference: https://www.ibm.com/support/pages/rollforward-asks-more-logs-are-not-included-online-backup-image

  • Solution

Execute


_10
db2 rollforward db <database> stop