1

I read about ROLLFORWARD option on link http://www-01.ibm.com/support/knowledgecenter/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0001978.html?cp=SSEPGG_9.7.0%2F3-6-2-4-106 but I could not find answer to my issue.

I have database in Archive mode.

I am using DISK option in LOGARCHMETH1

I made full ONLINE backup at Monday at 23:59

I have archive logs for Tuesday, Wednesday and Thursday. Let's say just for example one for each day: S0000001.LOG and S0000002.LOG and S0000003.LOG.

In Friday I have active log S0000004.LOG.

Let's say just for testing purpose I want to do the restore of Online backup made at Monday and all transactions committed during Tuesday, Wednesday,Thursday and Friday. So I want to restore everything from Monday to Friday

I thought by reading all manuals that I just need to perform after restore ROLLFORWARD TO END OF LOGS

db2 rollforward db maxdb75 to end of logs and complete;

I thought that this command to end of logs it will include Archive Logs(S0000001.LOG + S0000002.LOG + S0000003.LOG.)+Active Logs(S0000004.LOG)

But one good database expert told me that: "When rolling forward to end of logs without specifying overflow log path only active logs will be read"

So I have 2 questions:

  1. What in my example will be restored in case of "to end of logs" command
  2. Is this the command if after the restore I want to rollforward everything from Monday To Friday in my exampe: db2 rollforward db maxdb75 to end of logs and complete overflow log path "(/data/archiveLogsPath)";

Thank you in advance!!!!

4

Whoever told you "When rolling forward to end of logs without specifying overflow log path only active logs will be read" was wrong.

When you have LOGARCHMETH1 set to DISK, TSM, USEREXIT or VENDOR, the DB2 log manager EDU (db2logmgr) is responsible for moving log files to and from the archive location. When performing a ROLLFORWARD operation, DB2 will determine which log files it needs, and db2logmgr will retrieve files for processing if they aren't already in the active log path.

Now, if you have LOGARCHMETH1 set to LOGRETAIN, and you are manually moving log files from the active log path to somewhere else, only then will you have to specify OVERFLOW LOG PATH (or move/copy the transaction log files back to the active log path).

So: to end of logs means just what it sounds like: DB2 will replay all transactions present in log files between the backup time and when the restore took place.

  • Hi Ian, sorry for asking you here this question but can you help me with this one issue that I am having on different issue? I know you are the db2 guru which may help me:) thanks dba.stackexchange.com/questions/154230/… – Dejan Nov 4 '16 at 12:15
-1

Yes, Ian is correct here. I am sure your issue is resolve now. Also, archive logs can still exist in Active log path if we set LOGARCHMETH1 to LOGRETAIN correctly . Details at Information Center can give better overview .Hope it helps !

  • What does your answer add to the existing, accepted one? – mustaccio Jun 15 '16 at 18:15
  • The link shared also states the different combination values of both parameters benefit the log management. – shivrajk Jun 16 '16 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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