Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Location
    mississippi
    Posts
    18

    Unanswered: Help with User Exit !!

    Hello,

    I am currently running DB2 8.1.5 Workgroup Server Unlimited Edition. I have a small problem. I do weekly online backups of my DB but now the log files have reached over 5 GB and that is taking up too much backup tape to backup every day. Is there any way that after a online backup has been done DB2 will move the logs not needed for the roll forward process to another folder(possibly a mapped drive on the network)? I keep hearing something about a user exit command?


    Any help would be appreciated

    Thanks,

    Ron

  2. #2
    Join Date
    Mar 2004
    Posts
    448
    The userexit program moves the inactive log files to another location
    either to directory . You can use it with tsm to move the log files.

    The steps are very as follow.Do as root.

    1. Change the userexit db parameter.(Could be done last)
    2. At the sqllib/samples/c library there are c programs db2uext2.* for archiving at different locations and tools.

    3 Move them to a tmp directory and read the the files . how to compile them to your specific platform.

    4. Copy the executibles to the adm/bin directory.

    5. change its priviledges to executible.

    Good luck

    regards

    Mujeeb

  3. #3
    Join Date
    Aug 2003
    Location
    mississippi
    Posts
    18
    Thanks for the reply....2 questions

    1. what can I use for opening the files

    2. What is tsm

    thanks for your help in this matter

  4. #4
    Join Date
    Mar 2004
    Posts
    448
    These are c source(text) files, so any editor.
    Tsm is trivoli storage manager, another product.
    More information about userexit can be found at IBM site.

    regards & thanks

    Mujeeb

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I don't think USEREXIT is going to help in this case: it only copies the archived log files as they are being generated; I don't think it can determine whether a certain log file is not needed for recovery.

    I guess you could use the following approach: use "get db cfg for <database>" to determine the earliest log file needed for recovery (it advances after each backup) and then go and delete logs that are earlier than that file.

    Since log files are numbered sequentially it shouldn't be too difficult to write a script to automate this process.

Posting Permissions

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