If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > way to decide which log file is required

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-23-04, 17:21
udbdb2 udbdb2 is offline
Registered User
 
Join Date: Nov 2003
Posts: 121
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....
Reply With Quote
  #2 (permalink)  
Old 08-23-04, 19:19
rvsc36 rvsc36 is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 08-23-04, 19:57
udbdb2 udbdb2 is offline
Registered User
 
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!
Reply With Quote
  #4 (permalink)  
Old 08-24-04, 14:07
rvsc36 rvsc36 is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On