Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    4

    Unanswered: Queries on Setting up DB2 HADR on Solaris 10

    Hi there,

    I am planning to setup HADR with DB2 ESE 9.7 for which I need few clarifications. I have same hardware and software configurations on both the servers.


    •On both the servers, the file system which we have allocated for mounting the DB is different
    /tems01_data and /tems02_data. Will I be able to use this for Primary (/tems01_data) and Secondary (/tems02_data)?


    •I have attached the existing setup details of DB2 version 9.1 fp7, I will do a fresh installation of DB2 v 9.7 and then create a fresh database based on the attached configurations. Please have a look and let me know if any parameter requires change.


    •db2 backup database $database ONLINE to $BACKUP_DIR "with 2 buffers buffer 1000" "INCLUDE LOGS" "without prompting". This is the method I am using to take backup of existing DB both Primary and Secondary. Please let me know if it is advisable after I create HADR.


    •db2 backup database $database ONLINE INCREMENTAL to $BACKUP_DIR "with 2 buffers buffer 1000" "INCLUDE LOGS" "without prompting".This is the method I am using to take backup of existing DB both Primary and Secondary. Please let me know if it is advisable after I create HADR.


    •Will I be able to take backup of Standby DB after HADR?


    •If either Primary or Secondary crashes, will I be able to recover with existing offline or online backup images or I need to recreate HADR?


    •I have downloaded the package from IBM Passport site using our customer login, how about license in this case? should i apply license using normal procedures or not required for 9.7 ESE?

    As I am very new to DB2, I have posted all my questions so that I can get clarified before implementing HADR. I have already referred all the existing documents where I could not get a complete visibility. Please help me.

    Thanks,
    Arun
    Attached Files Attached Files

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    •On both the servers, the file system which we have allocated for mounting the DB is different
    /tems01_data and /tems02_data. Will I be able to use this for Primary (/tems01_data) and Secondary (/tems02_data)?

    This will create serious problems if any SQL statements for tablespaces affect the containers, since the paths are different. Not sure about automatic size increase or automatic storage, but please reconsider.

    •I have attached the existing setup details of DB2 version 9.1 fp7, I will do a fresh installation of DB2 v 9.7 and then create a fresh database based on the attached configurations. Please have a look and let me know if any parameter requires change.

    Will look at it later.

    •db2 backup database $database ONLINE to $BACKUP_DIR "with 2 buffers buffer 1000" "INCLUDE LOGS" "without prompting". This is the method I am using to take backup of existing DB both Primary and Secondary. Please let me know if it is advisable after I create HADR.

    Leave out the "with 2 buffers buffer 1000". DB2 will select optimum settings automatically.

    •db2 backup database $database ONLINE INCREMENTAL to $BACKUP_DIR "with 2 buffers buffer 1000" "INCLUDE LOGS" "without prompting".This is the method I am using to take backup of existing DB both Primary and Secondary. Please let me know if it is advisable after I create HADR.

    Not sure why you want incremental backup, so no comment.

    •Will I be able to take backup of Standby DB after HADR?

    No. But if you enable read-only on the standby you could export the data with isolation level UR.

    •If either Primary or Secondary crashes, will I be able to recover with existing offline or online backup images or I need to recreate HADR?

    WIth HADR backups should not normally be needed to recover. If one server crashes (and does not restart) then do a takeover (failover) to other server.

    •I have downloaded the package from IBM Passport site using our customer login, how about license in this case? should i apply license using normal procedures or not required for 9.7 ESE?

    Normal "db2licm -a" to add a license is required for 9.7 ESE, but HADR is automatically included for free and no extra licensing is required.
    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
    Dec 2008
    Posts
    2
    I have successfully configured HADR, have attached the related configuration files.
    Can somebody have a look and let me know if it is of good health?

    I noticed the following things, please check if there would be any problems and/or to rectify that.

    Primary

    Path to log files = /tems01_data/warehous/db2inst1/NODE0000/SQL00001/SQLOGDIR/
    Standby

    Path to log files = /export/home/db2inst1/db2inst1/NODE0000/SQL00002/SQLOGDIR/

    Can I update the default DB path shown below to any other value on both the servers?

    Default database path (DFTDBPATH) = /export/home/db2inst1

    Backup - will the following command help me to take a good backup image?

    db2 backup database $database ONLINE to $BACKUP_DIR "INCLUDE LOGS" "without prompting"

    Restore - will the following command help me in restoring the backup image taken from previous command?

    db2 restore database warehous from "PATH" TAKEN AT 20090731163033 TO "PATH" INTO warehouse

    Disaster

    In case of Primary server crash

    - Will the secondary server automatically take over or I need to manually do it?

    - Assuming takeover is done (manually/automatically), Do I need to restore using existing online backup image or how will I bring back Primary?

    In case of Secondary Server Crash - I can take the offline image from existing Primary and restore and start HADR, isn't it?
    Attached Files Attached Files

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I have successfully configured HADR, have attached the related configuration files.
    Can somebody have a look and let me know if it is of good health?

    Looks OK, but you should not be using synch mode. Use nearsynch. There are almost no databases in the world that need synch mode.

    I noticed the following things, please check if there would be any problems and/or to rectify that.

    Primary

    Path to log files = /tems01_data/warehous/db2inst1/NODE0000/SQL00001/SQLOGDIR/
    Standby

    Path to log files = /export/home/db2inst1/db2inst1/NODE0000/SQL00002/SQLOGDIR/

    Can I update the default DB path shown below to any other value on both the servers?

    You can update the above, but will not take affect until next deactivation of databases. As I mentioned before, I would highly, highly recommend that you use exact same path names on both servers.

    Default database path (DFTDBPATH) = /export/home/db2inst1

    Backup - will the following command help me to take a good backup image?

    db2 backup database $database ONLINE to $BACKUP_DIR "INCLUDE LOGS" "without prompting"

    Yes

    Restore - will the following command help me in restoring the backup image taken from previous command?

    db2 restore database warehous from "PATH" TAKEN AT 20090731163033 TO "PATH" INTO warehouse

    You cannot restore to an HADR database (without first taking the database out of HADR mode and making it a "standard" database). It is normally quite rare that you would need to do that if you are using HADR.

    Disaster

    In case of Primary server crash

    - Will the secondary server automatically take over or I need to manually do it?

    No, you must issue the takeover command yourself or have some software that monitors the servers and does it for you. IBM supplies Tivoli System Automation to do that (usually free with DB2), but it is a bit complex.

    - Assuming takeover is done (manually/automatically), Do I need to restore using existing online backup image or how will I bring back Primary?

    No, you do not do a restore. If you do a takeover to standby server, so that it now is the primary, and you want to want to switch roles again so the main server is the primary once again, then you issue another takeover. Backups and restores are not part of the HADR recovery scenarios (only used in cases when both primary and standby servers have damaged databases or you need to restore to previous point in time).

    In case of Secondary Server Crash - I can take the offline image from existing Primary and restore and start HADR, isn't it?

    You would normally take an online backup and restore it to the standby and then start the standby database in HADR standby mode. However, if the standby server crashes, you normally just have to bring it back up and activate the database and it will get in synch again using the logs to catch up any missed transactions.

    If the pirmary server crashes and you do a takeover to standby, just bring up the primary server again and start the database in HADR standby mode (since the standby server is now the primary database after your takeover). Then when the standby is in synch, you can do a takeover to move the primary database back to the primary server.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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