Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2009
    Posts
    27

    Unanswered: HADR - Auto client reroute

    Hi All,

    We are testing HADR Automatic client reroute with our application - which performs bidirectional data flow. Our application fires SQL queries to fetch data from DB and to apply updates on to DB.

    We wanted see if SQL queries fired by our application are rerouted to Standby DB - but we receive error message mentioned below.

    ********
    SQL1224N
    SQL1224N The database manager is not able to accept new requests, has terminated all requests in progress, or has terminated the specified request because of an error or a forced interrupt. SQLSTATE=55032..]
    ********
    HADR is setup alright - when I performed Takeover from a switch role happened - but our application failed to communicate with new primary.

    Should our application try reconnecting if it encounters SQL1224N?

    Any help highly appreciated.

    Thanks and Regards,
    Mahesh

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    if an application is connected - the first sql after takeover will return error
    you have to re-execute the same query (connect is not needed)
    if the appl is not connected = no error with connect - immediate connection to alternate server
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    I am not sure SQL1224N is the error received when ACR has detected a switch to new database (due to HADR takeover in this case). I thought the error code for that was SQL30108N (which indicates rollback of previous transaction and succuessful reconnection to the new database). SQL1224N may be a different problem.
    Last edited by Marcus_A; 09-22-11 at 07:25.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Feb 2009
    Posts
    27
    Thanks to both,

    Is there way I can test to see if client reroute is actually taking place? outside our application?

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by mahesh_terdal View Post
    Thanks to both,

    Is there way I can test to see if client reroute is actually taking place? outside our application?
    ACR only exists for a particular connection, so that does not make any sense. You can test it from the command line to see if it works, but that is a type 2 driver, and if you have java app you are using type 4 universal driver.

    Within a particular DB2 connection, you can query the host name of the DB2 server using a DB2 admintrative SP or view (don't recall the exact names) that will tell you the server you are connected to.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    if the prim is on node2 and you try to connect (check with db2pd)
    if ok = you are connected to node2
    if msg indicates : you can not connect to hadr standby db - you are still routing the connection to original primary - no acr has occured..
    if connection was cataloged from db2 client - you can see the acr info in db2 list db directory
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  7. #7
    Join Date
    Feb 2009
    Posts
    27
    Thanks again.

    From what i see - I soon after I configured HADR - the Standby DB was cataloged in the DB2 control center that is running on Primary machine(so I see both Prim and stdby on primary machine using CC).

    As you correctly said - initially I was not able to connect to stand by - but now (I performed take over twice - so original prim is prim now and stdby is stdby ) - but now I continue to access cataloged stand by from primary machine and I am able to connect to it - where as when I log in to Standby machine and if try accessing stdby I am not able to do so.

    Is my setup messed up?

  8. #8
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    it is not very clear what you request
    why using db2cc : you don't know what this tool is doing/executing for you
    always use some command line interface where you see the correct command you typed and the complete message returned.. the messages from db2cc are not very clear and can be rerouted to a general message..
    try to create a complete scenario where you execute the correct commands
    do takeover
    execute again and see all messages and try to understand what you did
    with db2cc this is not possible
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  9. #9
    Join Date
    Feb 2009
    Posts
    27
    Thanks - I will recreate and get back to you

Posting Permissions

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