Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2005
    Posts
    40

    Exclamation Unanswered: Trying to set up HADR

    Hi team I installed db2 ESE on windows with version 8.1.0.36, in the note i see that i need to change the HADR_LOCAL_HOST parameters where to find this configs.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Here some instructions I worked up after confguring HADR myself:

    Add the following to /etc/services on Primary Server:
    hadrinstp 18819/tcp

    Add the following to /etc/services on Standby Server:
    hadrinsts 18819/tcp

    Note: Each DB2 database that uses HADR on a given physical server needs its own port for hadr_local_svc.


    On Primary Server:
    db2 update db cfg using LOGARCHMETH1 DISK:/localhome/db2inst1/archive_logs
    Note: This enables log retain, but you can set other config parms to enable log retain. Make sure the directory already exists.

    db2 BACKUP DATABASE <db-name> TO "/db_backup" COMPRESS WITHOUT PROMPTING
    (backup to whatever directory you want)

    On Standby Server:
    restore the backup on the secondary server:
    db2 RESTORE DATABASE <db-name> FROM "/db_backup/" TAKEN AT 20051101173309 replace history file
    Note: do not rollforward. ON Windows, you must copy the entire backup directory path to the standby server to do a restore.

    On Primary Server:
    db2 update db cfg for <db-name> using HADR_LOCAL_HOST <primary host name>
    db2 update db cfg for <db-name> using HADR_REMOTE_HOST <secondary host name>
    db2 update db cfg for <db-name> using HADR_LOCAL_SVC 18819
    db2 update db cfg for <db-name> using HADR_REMOTE_SVC 18819
    db2 update db cfg for <db-name> using HADR_REMOTE_INST db2inst1
    db2 update db cfg for <db-name> using HADR_SYNCMODE nearsync
    db2 update db cfg for <db-name> using HADR_TIMEOUT 30
    db2 update alternate server for database <db-name> using hostname <secondary host name> port 50000

    On Standby Server:
    db2 update db cfg for <db-name> using HADR_LOCAL_HOST <secondary host name>
    db2 update db cfg for <db-name> using HADR_REMOTE_HOST <primary host name>
    db2 update db cfg for <db-name> using HADR_LOCAL_SVC 18819
    db2 update db cfg for <db-name> using HADR_REMOTE_SVC 18819
    db2 update db cfg for <db-name> using HADR_REMOTE_INST db2inst1
    db2 update db cfg for <db-name> using HADR_SYNCMODE nearsync
    db2 update db cfg for <db-name> using HADR_TIMEOUT 30
    db2 update alternate server for database <db-name> using hostname <primary host name> port 50000


    On Standby (always start standby first):
    db2 start hadr on db <db-name> as standby

    On Primary (only after standby is started):
    db2 start hadr on db <db-name> as primary

    Takeover:
    Issue this command on the standby server instance:

    db2 TAKEOVER HADR ON DATABASE <db-name> USER db2inst1 BY FORCE
    Note: “BY FORCE” is optional and not necessary if both servers are responding).

    Wizard:
    Or you can use the HADR Wizard to set it up. This is invoked via the Control Center, Database (right click), High Availability.
    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
    Mar 2005
    Posts
    40
    Hi there i right clicked on the Database in the control center and i dont see High availability option, how to check if Hadr is installed with 8.0 ese

    Thank you
    Ugra

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You need DB2 V8.2. You can download and install FP10 and that will bring you up to the latest release (8.2.3).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Mar 2005
    Posts
    40
    Thank you marcus that was very helpful

    Thanks
    Ugra

Posting Permissions

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