Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2003
    Posts
    68

    Unanswered: Anyone using "log shipping" method of HA?

    I want to implement "log shipping" method as a hot standby. This is not for high availability, but more for disaster recovery.

    Has anyone set this up? What method are you using to transfer the logs over? Any help with this is much appreciated.




    -terrence

  2. #2
    Join Date
    Aug 2004
    Posts
    138
    We currenly use this for our DR. What we do is, use userexit program to transfer logs from production to tsm. At the DR side we run a script to extract and apply the logs from tsm every 2 hours. The dr is always in rollforward mode. Both DR and Prod should point to same tsm server. This is what you are looking for?

  3. #3
    Join Date
    Aug 2003
    Posts
    68
    Yes - I'm looking for something similar to this. Only, I want the logs transfered and to the bkup server and applied as soon as they're completed.

    Can the userexit program be a unix shell script? or a perl script?

  4. #4
    Join Date
    Jun 2003
    Location
    Chennai
    Posts
    26

    logshipping using shell script

    We had the similar kind of environment. We have archive directory in primary db system and retrieve directory in DR db system. shell script will move the files from archive direvtory to retrieve directory. User exit program running on the DR site will rollforward to end of logs without complete.

    HOpe it helps you.
    MS

  5. #5
    Join Date
    Aug 2004
    Posts
    138
    userexit comes with IBM samples.here are the steps u need to follow

    MAkesure you have tsm configured first..then
    1. cp sqllib/samples/c/db2uext2.ctsm to a work directory and call it db2uext2.c
    2. chmod 750 db2uext2.c
    3. vi db2uext2.c and change the following lines:
    from: #define AUDIT_ERROR_PATH "/u/" /* path must end with a slash */
    to: #define AUDIT_ERROR_PATH "Whatever U need" /* path must end with a slash */


    5. after saving that file in step 4, run the following at the command line:
    if AIX: cc_r -o db2uext2 db2uext2.c /usr/tivoli/tsm/client/api/bin/libApiDS.a -I/usr/tivoli/tsm/client/api/bin/sample

    if Sun: /opt/SUNWspro/bin/cc -o db2uext2 db2uext2.c /opt/tivoli/tsm/client/api/bin/libApiDS.so -I /opt/tivoli/tsm/client/api/bin/sample

    5. move the result file db2uext2 to the sqllib/adm directory.

    6. The above steps complile the user exit program for tsm. It requires that you have a c compiler installed on your unix lpar/domain.

    7. Set the following two db cfg parameters:
    update db cfg for x using LOGRETAIN RECOVERY
    update db cfg for x using USEREXIT ON

  6. #6
    Join Date
    Aug 2003
    Posts
    68
    Quote Originally Posted by chavadb2
    userexit comes with IBM samples.here are the steps u need to follow

    MAkesure you have tsm configured first..then
    1. cp sqllib/samples/c/db2uext2.ctsm to a work directory and call it db2uext2.c
    2. chmod 750 db2uext2.c
    3. vi db2uext2.c and change the following lines:
    from: #define AUDIT_ERROR_PATH "/u/" /* path must end with a slash */
    to: #define AUDIT_ERROR_PATH "Whatever U need" /* path must end with a slash */


    5. after saving that file in step 4, run the following at the command line:
    if AIX: cc_r -o db2uext2 db2uext2.c /usr/tivoli/tsm/client/api/bin/libApiDS.a -I/usr/tivoli/tsm/client/api/bin/sample

    if Sun: /opt/SUNWspro/bin/cc -o db2uext2 db2uext2.c /opt/tivoli/tsm/client/api/bin/libApiDS.so -I /opt/tivoli/tsm/client/api/bin/sample

    5. move the result file db2uext2 to the sqllib/adm directory.

    6. The above steps complile the user exit program for tsm. It requires that you have a c compiler installed on your unix lpar/domain.

    7. Set the following two db cfg parameters:
    update db cfg for x using LOGRETAIN RECOVERY
    update db cfg for x using USEREXIT ON


    And therein lies the problem. I'm using version 8.1 for Linux, and we have no compiler on our production servers. Does the userexit program have to be a "c" program? Can it be a a shell script or perl script?

    This is turning out to be more dificult the I imagined.

  7. #7
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Do you intend to move to Version 8.2 (has loads of goodies) .. It is Fixpak 7a on Versioon 8.1 ... With 8.2 you do not need a userexit program ... Specify loagarchmeth1 as disk:/logarchdir1, then you will have your logs archived to the specified directory ...

    Also, 8.2 comes with HADR which can be used for DR purposes ... It costs $$$, but easier to setup, test and more reliable ...

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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