Results 1 to 5 of 5

Thread: Backup Plan

  1. #1
    Join Date
    Sep 2003
    Posts
    63

    Unanswered: Backup Plan

    We have db2 8.1 on AIX. Need to implement backup plan to recover the data up to the minute. I see therte are some options like LOGRETAIN, USEREXIT. Do I have to set both to yes or one of those to yes?
    Why there r two different options?

    Thanks in advance,
    toby

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    A database is recoverable with rollforward recovery if it is configured with either logretain set to RECOVERY or userexit set to ON.

    Logretain indicates that log files necessary for rollforward recovery are to kept by DB2.

    Specification of userexit indicates that a user exit program is to be used to archive and retrieve the log files.

    Log files are archived when the database manager closes the log file. They are retrieved when the ROLLFORWARD utility needs to use them to restore a database.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Sep 2003
    Posts
    63
    Happy new year and thanks for all the help from this newgroup members. I am new to DB2 admin. Being SYBASE DBA in past and trying to adapt DB2.

    Thanks for the clarification. So what is the general practice? Logretain ON or USEREXIT ON? or Both ON?

    In what language do you write userexit prgram? Will it be .sh file ? How do you execute that program and frequency of the execution.

    Regards,
    toby

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    You will find a c sample of the userexit code in sqllib/samples/c , one each for archiving to tape, disk and tsm ... You will need to customize the program to your environment , build it and save the executable (named db2uext2.exe on windows and db2uext2 on unix platforms-with execute permission for the instance owner) to, preferabley, sqllib/misc .. Whenever a logfile is closed , db2 calls db2uext2 to archive the logs ...

    Well, whether you use the userexit or not, is dependent on how critical the logs are ... I would prefer to go for userexit on production databases and just logretain on other systems ... Logretain retains the logs on the disks and any disk/system failure, you loose the logs as well ... It occupies disk space as well ...

    HTH

    sAthyaram


    Originally posted by toby25
    Happy new year and thanks for all the help from this newgroup members. I am new to DB2 admin. Being SYBASE DBA in past and trying to adapt DB2.

    Thanks for the clarification. So what is the general practice? Logretain ON or USEREXIT ON? or Both ON?

    In what language do you write userexit prgram? Will it be .sh file ? How do you execute that program and frequency of the execution.

    Regards,
    toby
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Sep 2003
    Posts
    63
    Thanks...Will it be fine if we choose logretain ON and 'tar' backup the archive log directory?

    Thanks,
    toby

Posting Permissions

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