Common problems that may occur during DB2 backup, restore, or rollforward
In the scenarios listed here, the database name ldapdb2 is used. For change log, the change log database ldapclog can be used.
- Scenario 1
- When you try updating database configuration for online backup
parameters while ibmslapd is running:
db2 update db cfg for ldapdb2 using logarchmeth1 logretain trackmod on DB20000IThe 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 effective.
If you receive the displayed message, you must stop and restart ibmslapd for the changes to take effect. Use the following commands:ibmslapd –I ldapdb2 –k ibmslapd –I ldapdb2
- Scenario 2
- When you try performing online backup without setting logretain:
db2 backup database ldapdb2 online to /safeplace SQL2413N Online backup is not allowed because either logretain or userexit for roll-forward is not activated, or a backup pending condition is in effect for the database.
To set the archival logging parameters to enable rollforward recovery for the database ldapdb2 the following DB2 command must be run:db2 update db config for ldapdb2 using logarchmeth1 logretain
After archival logging is configured, the user must make a full backup of the database. This state is indicated by the backup_pending flag parameter. If a full backup has not been made, the following message will be displayed when the user connects to the database:
The database will be in backup pending state until an offline backup is performed. This could cause a server to fail when it connects to the database and will start in configuration mode only.db2 connect to ldapdb2 SQL1116N A connection to or activation of database <ldapdb2> cannot be made because of a BACKUP PENDING.
- Scenario 3
- Taking a full backup:
db2 backup database ldapdb2 to /safeplace
If the backup is successful, the following message is displayed:Backup successful.The timestamp for this backup image is : 20040308170601
- Scenario 4
- When you try to restore a database while ibmslapd is running,
the following message is displayed:
db2 restore db ldapdb2 from /safeplace SQL1035N The database is currently in use.
- Scenario 5
- If rollforward must be done after a restore:
The database will be in rollforward pending state until a rollforward command is issued. This could cause a server to fail when it connects to the database and will start in configuration mode only.db2 connect to ldapdb2 SQL1117N A connection to or activation of database “LDAPDB2” cannot be made because of ROLL-FORWARD PENDING.SQLSTATE=57019