Troubleshooting
Problem
Customer has restored copy of a DB2 database (from a backup) onto a new DB2 server. User has created a new database connection (to point to this new database copy). Afterwards, user launches 'Controller Configuration', opens 'Database Connections' and selects a database. User clicks green 'tick' to test the connection. An error appears.
Symptom
Connection failed
SQL1117N A connection to or activation of database "CCR" cannot be made because of ROLL-FORWARD PENDING. SQLSTATE=57019
Cause
The database requires rolling forward.
Diagnosing The Problem
Using IBM Data Studio, when connecting to the database you will get a similar error:
Resolving The Problem
Roll forward the database.
Steps:
Ask your I.T. department's database administrator (DBA) to perform the following:
1. Logon to the DB2 server (as an administrator)
2. Launch an appropriate tool
- For example: DB2 Command Window - Administrator
3. Run the following command:
db2 rollforward db ccr complete
NOTE: Replace 'CCR' with the name of your database.
Potential Errors
Depending on how your backup was taken, you may receive an error. Below are some examples:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(1) SQL1273N An operation reading the logs on database "CCR03" cannot continue because of a missing log file "S0019524.LOG" on database partion "0" and log stream "0".
In this scenario, you must:
1. Copy a log file from the 'old' database location (where you created the backup), to the 'new' database location.
EXAMPLE: In one real-life example, it was necessary to copy the file "S0019524.LOG":
- from the folder: E:\archived_logs\DB2\CCR01\NODE0000\LOGSTREAM0000\C0000000
- to the new folder: E:\archived_logs\DB2\CCR03\NODE0000\LOGSTREAM0000\C0000000
2. Perform the rollforward again (for example: db2 rollforward db ccr03 complete )
3. Test.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(2) SQL4970N Rollforward recovery stopped on the database named "CCR" because the rollforward utility cannot reach the specified stop point (end-of-log or point-in-time) on the following database partitions: "0".
This is caused by missing logs, caused by taking an online (not offline) backup. To solve this:
1. Run a command similar to the following:
- db2 restore db ccr logs from . logtarget d:
2. Run this command:
db2 get db cfg for ccr
3. Look for the entry similar to: Path to log files = D:\DB2\NODE0000\SQL00002\LOGSTREAM0000\
4. Open the folder mentioned (for example 'D:\DB2\NODE0000\SQL00002\LOGSTREAM0000') and copy the relevant log file (for example 'S0041211.log')
5. Browse to the folder where the new database's logs are stored (for example 'D:\DB2\NODE0000\SQL00002\LOGSTREAM0000\LOGSTREAM0000')
- Paste the log file (for example 'S0041211.log') into that folder.
6. Run this command:
- db2 rollforward db ccr to end of logs
7. Run this command:
- db2 rollforward db ccr complete
8. Test.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(3) SQL1276N Database "CCR" cannot be brought out of rollforward pending state until roll-forward has passed a point in time greater than or equal to "2017-10-31-12.09.26.000000 UTC", because node "0" contains information later than the specified time.
This is typically caused by the new (target) DB2 server having a different time zone from the original (source) DB2 server. To solve this, run a command similar to:
- db2 ROLLFORWARD DATABASE CCR to 2017-10-31-12.09.26.000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21962486