Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2005

    Unanswered: 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


  2. #2
    Join Date
    Sep 2003
    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.

  3. #3
    Join Date
    Jul 2005
    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...


  4. #4
    Join Date
    Jun 2003
    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.

  5. #5
    Join Date
    Jul 2005
    Thanks a ton!!

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


Posting Permissions

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