Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2008
    Posts
    32

    Unanswered: DB2 Online Backup

    Dear Friends

    I am performing db2 online backup for my db with Veritas NetBackup.

    I set the following parmetes in dc configration manager to be able to perform online backup

    LOGARCHMETH1=VENDOR:/usr/openv/netbackup/bin/nbdb2.sl64

    I already configer policy for netbackup db2.conf for db backup and archive Policy.

    Backup command :

    "db2 backup database EAIBDB2I online load '/usr/openv/netbackup/bin/nbdb2.sl64' without prompting"



    Once I check db2diag.log it's shows:

    "Starting online db backup .....etc"


    Also backup image stamp success



    My question Is this enough to backup db online without "logretain" or "userexit" enabled.


    Regards,
    Nasser

  2. #2
    Join Date
    Jan 2010
    Posts
    335
    You can't run an online backup if you are not using archive logging. With logarchmeth1 you implicitly activated archive logging. There's no need to set logretain ider userexit.

    IBM DB2 9.5 Information Center for Linux, UNIX, and Windows

  3. #3
    Join Date
    Apr 2008
    Posts
    32
    Thanks Friend,

    Just more clarification thats mean my db will be available for users to connect during this online backup without need to userexit or logretain to be enabled.


    Regards,
    Nasser

  4. #4
    Join Date
    Jan 2010
    Posts
    335
    Exactly

    In your db cfg "User exit for logging status" should be set to YES, because you set LOGARCHMETH1.

  5. #5
    Join Date
    Apr 2008
    Posts
    32
    Sorry Friend

    I am confused.


    Because once i set uesrexit to yes by default LOGARCHMETH1 will be set to LOGARCHMETH1 =userexit.
    So no vendor will be used any more.
    when i check link you provide i read the following
    ================================================== ================================================== ====================================
    ----
    ----
    VENDOR
    Specifies that a vendor library will be used to archive the log files. This value must be followed by a colon( and the name of the library. The APIs provided in the library must use the backup and restore APIs for vendor products.
    Note:
    If either logarchmeth1 or logarchmeth2 is set to a value other than OFF, the database is configured for rollforward recovery.
    Enabling or disabling archive logging is an offline database activity. You must terminate all connections to the database before the new setting takes effect. Only changes in the logging path can be done online.
    If you update the userexit or logretain configuration parameters logarchmeth1 will automatically be updated and vice versa. However, if you are using either userexit or logretain, logarchmeth2 must be set to OFF.
    ================================================== ================================================== =====================================



    My question if

    Userexit=off
    logretain=off
    LOGARCHMETH1=Vendor...

    After issue backup command db2diag show startting online db backup ...is this db accessable during this backup or i must enable userexit or logretain to be full onlinw and accessable during backup.

    My application is 24/7.

    Thanks
    Nasser
    Last edited by nasali; 07-26-10 at 10:36.

  6. #6
    Join Date
    Jan 2010
    Posts
    335
    I did no tested it, but i doubt that you can set Userexit to off, if logarchmeth1 is set.
    Logretain and Userexit is 'the old world' Logarchmeth is 'the new world'.

    If you work with LOGARTHMETH-Options you don't need to care about the Logretain or Userexit. DB2 takes care of it.

    logarchmeth1 - Primary log archive method configuration parameter
    ...
    3. If you update the userexit or logretain configuration parameters logarchmeth1 will automatically be updated and vice versa. However, if you are using either userexit or logretain, logarchmeth2 must be set to OFF.
    ...

  7. #7
    Join Date
    Apr 2008
    Posts
    32
    Dear Friend


    Once i update userexit on atumatically --->LOGARCHMETH1=userexit


    Log retain for recovery enabled (LOGRETAIN) = OFF
    User exit for logging enabled (USEREXIT) = ON

    HADR database role = STANDARD
    HADR local host name (HADR_LOCAL_HOST) =
    HADR local service name (HADR_LOCAL_SVC) =
    HADR remote host name (HADR_REMOTE_HOST) =
    HADR remote service name (HADR_REMOTE_SVC) =
    HADR instance name of remote server (HADR_REMOTE_INST) =
    HADR timeout value (HADR_TIMEOUT) = 120
    HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC

    First log archive method (LOGARCHMETH1) = USEREXIT
    Options for logarchmeth1 (LOGARCHOPT1) =


    but with
    > db2 update db cfg using LOGARCHMETH1 VENDOR:/usr/openv/netbackup/bin/nbdb2.sl64
    DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
    > db2 get db cfg
    -------------
    --------------
    -------------etc
    userexit automaticlly set to as following :
    Log retain for recovery enabled (LOGRETAIN) = OFF
    User exit for logging enabled (USEREXIT) = OFF

    HADR database role = STANDARD
    HADR local host name (HADR_LOCAL_HOST) =
    HADR local service name (HADR_LOCAL_SVC) =
    HADR remote host name (HADR_REMOTE_HOST) =
    HADR remote service name (HADR_REMOTE_SVC) =
    HADR instance name of remote server (HADR_REMOTE_INST) =
    HADR timeout value (HADR_TIMEOUT) = 120
    HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC

    First log archive method (LOGARCHMETH1) =VENDOR:/usr/openv/netbackup/bin/nbdb2.sl64
    Options for logarchmeth1 (LOGARCHOPT1) =
    Second log archive method (LOGARCHMETH2) = OFF



    That's mean once you change LOGARCHMETH1 to vendor userexit and logretain set off.

  8. #8
    Join Date
    Jan 2010
    Posts
    335
    It looks like it.
    Does "archive log for db DBNAME" work? Are the files copied to Veritas?
    Then everything is fine.

    The Userexit is listed twice in db configuration:
    Log retain for recovery status = NO
    User exit for logging status = YES
    ...
    Log retain for recovery enabled (LOGRETAIN) = OFF
    User exit for logging enabled (USEREXIT) = OFF

    Since you are no to the topic and/or you switched to Veriatas, you should Test the restore from a database.

  9. #9
    Join Date
    Apr 2008
    Posts
    32
    I try to restore it from verise and it's fine.

    Thanks Very much for quick response.

    Regards,
    Nasser

Posting Permissions

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