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 > DB2 history file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-30-10, 09:31
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
DB2 history file

Hi,
I am runnig DB2 9.1 on aix.
When i execute "list history backup all for db" to identify log files required to rollforward database, i can see only 13 entries.
1. What if timestamp i am looking for is not in the history file. In that case, how would I identify what log files will be required to recovery.
2. I it possible that history can be saved for more than 13days. If yes, how do i do that?
Reply With Quote
  #2 (permalink)  
Old 08-30-10, 10:06
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
Hi,

regarding point 2. The Rentetion Period is controlled by a db cfg Parameter:
Recovery history retention (days) (REC_HIS_RETENTN) = 366
The deafult is 366 days.

If you start the rollforward for the database, DB2 will prompt you for the first logfile required. If you specify a timestamp, DB2 will tell you which one is the latest required logfile.

Cheers
nvk
Reply With Quote
  #3 (permalink)  
Old 08-30-10, 10:17
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
I didn't change the default value and it is still set to 366 but can only view 13days entry. Any other place where it is controlled from?
Reply With Quote
  #4 (permalink)  
Old 08-30-10, 10:32
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
There are many places. The history file could be replaced from a restore. Also the instance Owner can prune the history manually:
PRUNE HISTORY timestamp [WITH FORCE OPTION] [AND DELETE]
Reply With Quote
  #5 (permalink)  
Old 08-31-10, 03:23
db2cap db2cap is offline
Registered User
 
Join Date: May 2010
Posts: 87
But there is no pruning of history file also. I am also wondering, why it is for only 13days for all the databases instead of 366
Reply With Quote
  #6 (permalink)  
Old 08-31-10, 03:52
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
Well,
that's a question i can't answer. I don't know your System.
Reply With Quote
  #7 (permalink)  
Old 08-31-10, 06:54
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2cap View Post
But there is no pruning of history file also.
What do you mean by that? PRUNE HISTORY does just that, removes records from the history file.
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