1

I do restore command of backup image which was made 03.03.2015 at 19:20:

db2 restore database maxdb71 from "/data/archiveBackup" taken at 20150303192002 without prompting;

Then I try to do the rollforward to a point in time (03.03.2015 at 21:05) so this is after the backup image:

db2 rollforward db maxdb71 to 2015-03-03-21.05.00.000000 using local time and complete;

But I receive error:

SQL4970N  Roll-forward recovery on database "MAXDB71" cannot reach the 
specified stop point (end-of-log or point-in-time) on database partition(s) 
"0". Roll-forward recovery processing has halted on log file "S0000189.LOG".

So like it cannot find log S0000189.LOG. But this log EXISTS in the archive log location (C0000004 currently subfolder is used for archive logs) /data/archive/ctginst1/MAXDB71/NODE0000/C0000004>:

these are the timestamps for some of archive log files:

ctginst1 db2iadm1 15765504 2015-03-03 19:22 S0000187.LOG
ctginst1 db2iadm1 16785408 2015-03-03 21:52 S0000188.LOG
ctginst1 db2iadm1 16785408 2015-03-04 00:15 S0000189.LOG
ctginst1 db2iadm1 16785408 2015-03-04 02:32 S0000190.LOG

Basically log file S0000188.LOG should be the one which contains transactions from 21.05, right?

So why I cannot do the rollforward of point in time when I have necessary logs? I am really confused with this rollforward option.

When I do db2 rollforward database maxdb71 to end of logs and complete; it is successful and I get information:

 Log files processed                    = S0000187.LOG - S0000188.LOG

So to end of logs works but why I cannot perform until some specific point in time?

1 Answer 1

2

If you archive logs to a location different from the active log directory (logpath database configuration parameter), you need to specify the clause overflow log path /path/to/archived/logs. The ROLLFORWARD command does not do it automatically.

PS. You really should start reading manuals -- they are full of useful stuff, including multiple examples...

7
  • I succeeded to do the rollforward I added additional double quotes db2 rollforward db maxdb71 to 2015-03-03-21.05.00.000000 using local time and stop overflow log path "(/data/archive/)"; so thank you for help... but I am really confused when doing "end of logs" then database is smart enough to find all necessary archive logs, right? why is then not smart enough to find all necessary archive logs in case when doing the "point-in-time"??? I am confused why overflow must be mentioned because when doing rollforward END OF LOGS it is not necessary to do that
    – Dejan
    Commented Mar 4, 2015 at 13:17
  • just to summarize FINAL QUESTION: why in case of POINT IN TIME db does not automatically reads ARCHIVE LOG folder (overflow must be specified) while in the case of END OF LOGS it is "smart" enough to look for ARCHIVE FOLDER on which after that it do the rollforward of archive logs until the end of them???
    – Dejan
    Commented Mar 4, 2015 at 13:45
  • @Dejan - When rolling forward to end of logs without specifying overflow log path only active logs will be read.
    – mustaccio
    Commented Mar 4, 2015 at 14:37
  • @@mustaccio If my backup is at Monday 23:00 and archive logs are covering Tuesday, Wednesday and Thursday, and active logs are from Friday, if I do "to end of logs" without specifying overflow log path what will be restored? Data from Monday and Friday but not and from Tuesday, Wednesday and Thursday??? I am really confused I read a lot I think I figured it out but now I am totally confused. This does not make sense to me. What data will be restored in this simple use case when using END OF LOGS? Thank you!!!
    – Dejan
    Commented Mar 4, 2015 at 15:29
  • @@mustaccio can you please comment my last post? thank you very much
    – Dejan
    Commented Mar 5, 2015 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.