Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    2

    Unhappy Unanswered: DB2 is missing a transaction log during a rollforward

    I've been bashing my head against a brick wall for some time on this. Hopefully someone has the answer:

    I have a user exit that archives transaction logs to a managed set of
    dated directories. These directories each contain an online backup that
    is taken each evening. Before each backup is taken a new directory is created and the user exit always puts transaction logs into the new dir.

    Here's the thing: Sometimes when I go to restore the DB image and
    rollforward through the transaction logs, DB2 wants a log file that was
    archived 5 minutes BEFORE I started the online backup. How can I predict this behaviour?

    Also when rolling forward to the end of the logs DB2 always seems to want the currently active logs as well as the archived ones. In some instances I will be restoring to a system that does not have the active logs present. How can I tell DB2 to rollforward to the end of the archived logs only? Or is there a mechanism for extracting the time of the last transaction from a log so that I can use that iso time on the
    command line.

    Thanks in advance for any help.

  2. #2
    Join Date
    Nov 2002
    Location
    Rio de Janeiro - Brazil
    Posts
    78

    Re: DB2 is missing a transaction log during a rollforward

    Hey Evskinner,

    Do you use Online Backups only ??
    Theres a note at the Command Refference for the Roll-Forward statement that might enlighten your thoughts:

    "If restoring from an image that was created during an online backup operation, the specified point in time for the rollforward operation must be later than the time at which the online backup operation completed."

    Thus, it will try to read the logs archived before the online backup.

    Another options would be to roll it forward to the End of Logs. Or even, try to restore the DB Image specifying the option "Without Rolling Forward", although Im not sure if you can restore from an online backup without rolling forward.

    But if you must roll the database forward, then consider the quote above.

    HTH,
    Fernando

    Originally posted by evskinner
    I've been bashing my head against a brick wall for some time on this. Hopefully someone has the answer:

    I have a user exit that archives transaction logs to a managed set of
    dated directories. These directories each contain an online backup that
    is taken each evening. Before each backup is taken a new directory is created and the user exit always puts transaction logs into the new dir.

    Here's the thing: Sometimes when I go to restore the DB image and
    rollforward through the transaction logs, DB2 wants a log file that was
    archived 5 minutes BEFORE I started the online backup. How can I predict this behaviour?

    Also when rolling forward to the end of the logs DB2 always seems to want the currently active logs as well as the archived ones. In some instances I will be restoring to a system that does not have the active logs present. How can I tell DB2 to rollforward to the end of the archived logs only? Or is there a mechanism for extracting the time of the last transaction from a log so that I can use that iso time on the
    command line.

    Thanks in advance for any help.

  3. #3
    Join Date
    Jan 2003
    Posts
    2
    Thanks for the suggestion Fernando.

    The problem was that DB2 wanted a transaction log that was archived BEFORE the backup was taken so I didn;t know about it. I have now found that "db2 list db backups for DBNAME" tells me what the first needed transaction log is for each backup. This solves my first problem.

    I still need a way to find out what time the transactions happened that are contained in each log though. Anyone any ideas?

    Ev.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    For log analysis you might need to have a look at the DB2 Recovery Expert for Multiplatforms ...

    It is available from V7.2 onwards ...

    You will have to buy this product separately .... Though I recall reading that a trial version is being shipped with V8 ...

    HTH

    Cheers

    Sathyaram

    Originally posted by evskinner
    Thanks for the suggestion Fernando.

    The problem was that DB2 wanted a transaction log that was archived BEFORE the backup was taken so I didn;t know about it. I have now found that "db2 list db backups for DBNAME" tells me what the first needed transaction log is for each backup. This solves my first problem.

    I still need a way to find out what time the transactions happened that are contained in each log though. Anyone any ideas?

    Ev.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •