Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    121

    Unanswered: way to decide which log file is required

    If you keep more than one backup ,how is it decided that which logs needs to be kept for restore ?
    We know that to find last log but interested in finding for restore requirement of log files for rollforward.

    Thanks in advance....

  2. #2
    Join Date
    Jan 2004
    Location
    Phoenix, AZ
    Posts
    42
    Hi,

    I am assuming that your backups are not full (no logs needed). If you want to know which logs DB2 will need to use to restore from an incremental or Delta backup:

    - run these commands to identify the logs necessary and backup timestamp for the restore:

    list history backup all for db xxxx
    db2 rollforward database xxxx query status - shows which logs will be applied
    db2 rollforward database xxxx to end of logs and complete

    Hope this answers your question?

    Thx

  3. #3
    Join Date
    Nov 2003
    Posts
    121

    This is at restore,we want to know well in advance

    I think it does not answer my question.
    The way you said is reactive.
    It means we will know only at time we restore database.what we want to do is that keep more than 2 backups taken at diffrent interval ( for now say it is normal ,not delta or incremental but online bkups ) ,so log files will grow accordingly.
    Now if you need to restore db with back up other than last back up and if it needs logs which we have removed than it will not be able to restore that database as it is missing the necessory log files.To avoid this situation and be proactive we want to determine that for example,

    let us say we backed up db at time 't1' and backup is 'b1' and than next day backed up at 'time 't2' and backup 'b2' and than 't3' and backup file is 'b3'

    now from time 't1' through 't3' there are certain log files ( database log files) creatd whether is online archive and offline archive files and active log files.

    so to restore database with backup 'b1' taken at time 't1' once it needs required log files---> this is what we want to know proactively as we want to make sure to keep this log files.

    Please bear with me if this is confusing.

    And ofcourse thanks in advance!

  4. #4
    Join Date
    Jan 2004
    Location
    Phoenix, AZ
    Posts
    42
    Ok,

    DB2 keeps track of which logs are needed for a particular backup. DB2 uses a user exit routine to archive logs to an extenal media (Like TSM). Logs do not need to be deleted due to this. As you know, it is not recommended to ever delete any logs due to the fact that your db becomes unrecoverable when log files are deleted.

    Hope this helps. For more info, see these links:

    http://publib-b.boulder.ibm.com/Redb...0313.html?Open

    http://www-106.ibm.com/developerwork...5adamache.html

Posting Permissions

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