Automate delete archive log !

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alex250374
    New Member
    • Apr 2008
    • 9

    Automate delete archive log !

    I have a db is in archive mod (LOGRETAIN = RECOVERY) and logprimary is set to 3. Pat the log file is / arch_log. If I go in that path i have:
    S0000000.LOG
    S0000001.LOG
    S0000002.LOG
    S0000003.LOG
    S0000004.LOG
    S0000005.LOG
    S0000006.LOG

    But the active logs are only S0000004.LOG S0000005.LOG S0000006.LOG (db cfg >>> First active log file S0000004.LOG) ?
    Others can delete ??? I can not automate the delete logs archived ?

    Help me please !!!!
  • docdiesel
    Recognized Expert Contributor
    • Aug 2007
    • 297

    #2
    Hi,

    I wouldn't delete that old log files easily. They are inactive and could be deleted, yes. But then you wouldn't be able to restore a backup from the days these log files have been active.

    So if you're sure you won't need to restore backups e.g. older than 7 days, then you could delete the log files older than this.

    Regards,

    Bernd

    Comment

    • alex250374
      New Member
      • Apr 2008
      • 9

      #3
      Hi docdiesel,

      thank you for your reply.

      My problem is this: I must set the DB for full online backup includes logs all day with VERITAS. I set LOGRETAIN = RECOVERY and USEREXIT = ON. Veritas makes backup without problem but does not erase the log achieved!
      So that the filesystem where there are logs will be filled very soon!!!

      How can I do? I do not know where most beat their heads!

      Comment

      • docdiesel
        Recognized Expert Contributor
        • Aug 2007
        • 297

        #4
        Hi,

        I don't know Veritas, but we once had a database where we used the DB2 userexit db2uext2 to archive (and then delete) the logs automatically into our ADSM server (now called TSM). Please have a look at the site of IBM where they provide an article called "Setting Up a User Exit on DB2 UDB V8 to Archive Database Logs". This could be helpful to you, from the DB2 side. From the Veritas side, well, I can't tell, I'm sorry.

        Best regards,

        Bernd

        Comment

        • awfcai
          New Member
          • Jul 2008
          • 1

          #5
          Please contract Viretas support. Viretas netbackup have two options for db2 archive log file ,one is COPY, the other is move.

          Comment

          • caviler
            New Member
            • Feb 2014
            • 5

            #6
            bash shell version of db2uext2 (DB2 USEREXIT),backu p archive log to remote host!

            Comment

            Working...