Common BACKUP DB and RESTORE DB errors

Common errors that are derived from BACKUP DB or RESTORE DB commands might include SQL return or error codes.

The following errors are some of the more common errors that are displayed when you issue the BACKUP DB or RESTORE DB commands.

ANR2968E - Database backup terminated Db2 SQLCODE -2033 SQLERRMC 406

To resolve the SQL 406 error message, ensure that the following issues are resolved:
  • The DSMI_CONFIG environment variable points to a valid IBM® Storage Protect options file.
  • The instance owner has read access to the dsm.opt file.
  • The DSMI_CONFIG environment variable is set in ~/sqllib/userprofile and ~/sqllib/usercshrc.

Db2 SQLCODE: -2033, Db2 SQLERRMC: 106

If you receive the SQL 106 error message, it can mean that there is a permissions problem with the log file that the application programming interface (API) for the client writes.

To resolve the error, find the log file with the permissions problem, log in using the root user ID, and delete the file.

Db2 SQLCODE: -2033, Db2 SQLERRMC: 168

Verify that the DSMI_DIR environment variable points to the client API executable directory that contains the trusted communication agent dsmtca.

ANR2971E - Database backup/restore/rollforward terminated Db2 SQLCODE - 2071 error

The library cannot be loaded because the library or a library that is required by this library does not exist or does not have a valid format. If a library cannot be loaded, it means that a 32-bit library is being loaded in a 64-bit instance, or a 64-bit library is being loaded in 32-bit instance. If a library cannot be loaded, it also indicates that the DSMI_DIR environment variable points to the wrong IBM Storage Protect client API executable files. To obtain information about the error, open a Db2® command line processor window and issue the following command:
db2 => ? sql2071

Verify that if any changes were made to the tsmdbmgr.opt, dsm.sys, or sqllib/userprofile files, the Db2 instance is recycled so that it picks up the new values. To recycle the Db2 instance, stop and start the IBM Storage Protect server. Also, verify that the EXPORT command precedes the DSMI_*= entries in the sqllib/userprofile file.

Error message indicates that the node is locked

You might receive an error when Db2 contacts the server and a particular node, and receives an error message that states that the node is locked.

To correct the error, use the localhost address instead of an explicit loopback address, for example 127.0.0.1. Specify the tcpserveraddress localhost option in the SERVERNAME TSMDBMGR_TSMINST1 stanza of the dsm.sys file.

Problems with database backup performance

In some cases, particularly on AIX® systems, if the server is configured to use TCP/IP for database backup and restore operations, database backups might be slow. To resolve the problem, configure the server instance to use shared memory.