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 > Understanding transaction logs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-19-06, 13:38
anksagr anksagr is offline
Registered User
 
Join Date: Jul 2005
Posts: 102
Understanding transaction logs

Hi Everybody!!

I ran ito a problem with logs. We are running DB2 UDB v8.1 FP7, OS: AIX. For 2 days we had missed online backups (the online backup script was scheduled through UNIX scheduler and got stuck somewhere). And during that period the logs also didn't get archived.

Now my question is Can I restore the database to somepoint in time between those days when i didn't get the backups. I am assuming that if my logs didn't get archived they must be there in active logs which eventually got archived when we had a successfull backup after 2 days.

Also another question, do I need to set my USEREXIT to yes, if the LOGARCHMETH1 is set to TSM.



db2 get db cfg | grep log

User exit for logging status = YES
Catalog cache size (4KB) (CATALOGCACHE_SZ) = (MAXAPPLS*4)
Number of primary log files (LOGPRIMARY) = 30
Number of secondary log files (LOGSECOND) = 20
Changed path to log files (NEWLOGPATH) =
Path to log files = /prod1/sms/log/xyz/NODE0000/
Overflow log path (OVERFLOWLOGPATH) =
Mirror log path (MIRRORLOGPATH) =
First active log file = S0000353.LOG
Block log on disk full (BLK_LOG_DSK_FUL) = NO
Percent of max active log space by transaction(MAX_LOG) = 0
Num. of active log files for 1 active UOW(NUM_LOG_SPAN) = 0
Percent log file reclaimed before soft chckpt (SOFTMAX) = 100
User exit for logging enabled (USEREXIT) = OFF
HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
First log archive method (LOGARCHMETH1) = TSM
Options for logarchmeth1 (LOGARCHOPT1) =
Second log archive method (LOGARCHMETH2) = OFF
Options for logarchmeth2 (LOGARCHOPT2) =
Failover log archive path (FAILARCHPATH) =
Number of log archive retries on error (NUMARCHRETRY) = 5


I would appreciate some help in this area
Thanks in advance

Anks
Reply With Quote
  #2 (permalink)  
Old 05-19-06, 15:39
dbamota dbamota is offline
Registered User
 
Join Date: Sep 2003
Posts: 237
Look in Path to log files = /prod1/sms/log/xyz/NODE0000/ ; if this directory or TSM contains all logs before S0000353.LOG covering all logs for the days they were NOT backedup, you are OK to recover to any point in time.

If the LOGARCHMETH1 is set to TSM that should be enough; USEREXIT to yes is there for compatibility.
__________________
mota
Reply With Quote
  #3 (permalink)  
Old 05-19-06, 16:42
anksagr anksagr is offline
Registered User
 
Join Date: Jul 2005
Posts: 102
Thanks for the reply..

Yes I have all the logs before S0000353.Log.

Since the logs were not written to tape drives for 3 days and they were lying in the active log directory, how do I make sure that they were not overwritten.

Thanks again...

Anks
Reply With Quote
  #4 (permalink)  
Old 05-21-06, 06:49
msundaram msundaram is offline
Registered User
 
Join Date: Jun 2003
Location: Chennai
Posts: 26
If your database is enabled for archiving your active txn. logs are not overwritten. If archiving is not enabled you will get active log path full error and continuous txn. will fail. So the existing active logs are are not overwritten.
__________________
MS
Reply With Quote
  #5 (permalink)  
Old 05-22-06, 09:15
anksagr anksagr is offline
Registered User
 
Join Date: Jul 2005
Posts: 102
Thanks a ton!!

Ahhhh, now I understand what exactly happened. You really solved my problem, thanks a lot. I appreciate your help.


Anks
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