If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > HADR - Auto client reroute

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-22-11, 05:49
mahesh_terdal mahesh_terdal is offline
Registered User
 
Join Date: Feb 2009
Posts: 27
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
Reply With Quote
  #2 (permalink)  
Old 09-22-11, 05:57
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
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
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 09-22-11, 06:19
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390

Last edited by Marcus_A; 09-22-11 at 06:25.
Reply With Quote
  #4 (permalink)  
Old 09-22-11, 06:21
mahesh_terdal mahesh_terdal is offline
Registered User
 
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?
Reply With Quote
  #5 (permalink)  
Old 09-22-11, 06:29
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #6 (permalink)  
Old 09-22-11, 07:13
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
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
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #7 (permalink)  
Old 09-22-11, 07:46
mahesh_terdal mahesh_terdal is offline
Registered User
 
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?
Reply With Quote
  #8 (permalink)  
Old 09-22-11, 08:27
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
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
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #9 (permalink)  
Old 09-22-11, 09:01
mahesh_terdal mahesh_terdal is offline
Registered User
 
Join Date: Feb 2009
Posts: 27
Thanks - I will recreate and get back to you
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On