Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2012
    Posts
    5

    Unanswered: HADR Auto Client Reroute issue

    I have succusfully implemented HADR on 2 of my DB servers . we use DB2 9.7 fp 4 on AIX 7 information about these servers
    Primary
    db2 get db cfg for DATAPLAN |grep HADR
    HADR database role = PRIMARY
    HADR local host name (HADR_LOCAL_HOST) = testdb2b
    HADR local service name (HADR_LOCAL_SVC) = 55001
    HADR remote host name (HADR_REMOTE_HOST) = testdb2c
    HADR remote service name (HADR_REMOTE_SVC) = 55002
    HADR instance name of remote server (HADR_REMOTE_INST) = tstinst2
    HADR timeout value (HADR_TIMEOUT) = 3
    HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
    HADR peer window duration (seconds) (HADR_PEER_WINDOW) = 0

    set up ACR
    Database alias = DATAPLAN
    Database name = DATAPLAN
    Local database directory = /data/home/tstinst2
    Database release level = d.00
    Comment =
    Directory entry type = Indirect
    Catalog database partition number = 0
    Alternate server hostname = testdb2c
    Alternate server port number = 50200

    Standby
    db2 get db cfg for DATAPLAN |grep HADR
    HADR database role = STANDBY
    HADR local host name (HADR_LOCAL_HOST) = testdb2c
    HADR local service name (HADR_LOCAL_SVC) = 55002
    HADR remote host name (HADR_REMOTE_HOST) = testdb2b
    HADR remote service name (HADR_REMOTE_SVC) = 55001
    HADR instance name of remote server (HADR_REMOTE_INST) = tstinst2
    HADR timeout value (HADR_TIMEOUT) = 3
    HADR log write synchronization mode (HADR_SYNCMODE) = NEARSYNC
    HADR peer window duration (seconds) (HADR_PEER_WINDOW) = 0
    ACR info
    atabase alias = DATAPLAN
    Database name = DATAPLAN
    Local database directory = /data/home/tstinst2
    Database release level = d.00
    Comment =
    Directory entry type = Indirect
    Catalog database partition number = 0
    Alternate server hostname = testdb2b
    Alternate server port number = 50200

    I cataloged the entry for the primary DB on a client (type 2) and i am try to run the following query select * from customer it works fine. without disconnecting i run the following command on standby db2 takeover hadr on database DATAPLAN, the takeover is succuesfull and when i run the query from the client it gives the following
    SQL30108N A connection failed but has been re-established. The hostname or IP
    address is "mc21qaix006.ad.churchmutual.com" and the service name or port
    number is "50200". Special register settings might have been replayed. (Reason
    code = "1"). SQLSTATE=08506

    i try to run the query again and it runs fine.
    I can do the same thing using the by force command and things are good.
    Now my dilemma lies here

    Test case
    I want to test automatic client re route in a real time scenario. Take above sttings into consideration.
    1) from the client i connect to the primarry server and run select * from customer > query executes fine.
    2) i go to the primary server and run db2stop force (dbm stops)
    3) try to run same query from the client> query times out after 10 minutes wiuth the following (an ACR featutre)
    SQL30081N A communication error has been detected. Communication protocol
    being used: "TCP/IP". Communication API being used: "SOCKETS". Location
    where the error was detected: "10.20.9.6". Communication function detecting
    the error: "recv". Protocol specific error code(s): "73", "*", "0".
    SQLSTATE=08001

    Why doesnt ACR kick in now and connect to the standby server,it should connect to the standby server, but it is not connecting to that server.
    Is there something i am doing wrong?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by kkohli View Post
    Why doesnt ACR kick in now and connect to the standby server,it should connect to the standby server, but it is not connecting to that server.
    Is there something i am doing wrong?
    In addition to ACR, you need something to initiate HADR takeover when the instance crashes (or is shut down). All that ACR does is to keep trying both the primary and standby server to see which one is primary. Since you shut down the primary, the standby is still standby and there is no primary to connect to.

    In order to initiate automatic HADR takeover when the primary is not available, you need a cluster manager. DB2 includes TSA (Tivoli System Automation) for this purpose, or you may use another cluster manager, or your own scripts. Otherwise, you will have initiate HADR takeover manually.
    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
    Jul 2012
    Posts
    5
    Thanks Marcus I fiugred out that i will need to implement TSA with db2haicu
    thanks for the reply

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    In the test case you mention, ie , db2stop force, please note that the failover will not occur even if you are using TSA.

    =
    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
  •