473,394 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Automatic client reroute

I have a couple questions about setting up automatic client reroute.
First, after setting the alternate server for a database, is there a
way to verify the settings later on? The next thing is I've added
these values for my HADR pair, but I'm not sure I'm testing the basic
functionality correctly. I connect to the primary, then issue a
switch role takeover, then attempt to continue running SQL against the
database (I've also tried a connect with the now deactivated
database). In all cases, I still get the SQL30081 error, so have
obviously done something wrong.

Thanks,
Lisa
Dec 11 '07 #1
10 2553
<hu***********@gmail.comwrote in message
news:85**********************************@e23g2000 prf.googlegroups.com...
>I have a couple questions about setting up automatic client reroute.
First, after setting the alternate server for a database, is there a
way to verify the settings later on? The next thing is I've added
these values for my HADR pair, but I'm not sure I'm testing the basic
functionality correctly. I connect to the primary, then issue a
switch role takeover, then attempt to continue running SQL against the
database (I've also tried a connect with the now deactivated
database). In all cases, I still get the SQL30081 error, so have
obviously done something wrong.

Thanks,
Lisa
How are you submitting the SQL statements? Using type 2 driver or type 4
driver?
Dec 11 '07 #2
I am using type-2 right now (although later on, will need to use
type-4). Thanks.

On Dec 10, 11:07 pm, "Mark A" <nob...@nowhere.comwrote:
<hummingbir...@gmail.comwrote in message

news:85**********************************@e23g2000 prf.googlegroups.com...
I have a couple questions about setting up automatic client reroute.
First, after setting the alternate server for a database, is there a
way to verify the settings later on? The next thing is I've added
these values for my HADR pair, but I'm not sure I'm testing the basic
functionality correctly. I connect to the primary, then issue a
switch role takeover, then attempt to continue running SQL against the
database (I've also tried a connect with the now deactivated
database). In all cases, I still get the SQL30081 error, so have
obviously done something wrong.
Thanks,
Lisa

How are you submitting the SQL statements? Using type 2 driver or type 4
driver?
Dec 11 '07 #3
<hu***********@gmail.comwrote in message
news:34**********************************@y5g2000h sf.googlegroups.com...
>I am using type-2 right now (although later on, will need to use
type-4). Thanks.
If you do a "db2 list db directory" on your client, it will show the
alternate server info from the last time the client successfully connected
to the primary database. If the information is not correct, then something
is wrong.

When you start using type 4, then things get a bit more complicated since,
although the alternate server information is returned to the client upon
connection, it is not persisted anywhere for use by the client, unless the
client saves it somewhere. You will have to do some research on how to use
Automatic Client Reroute with a type 4 connection. The version 9 driver may
offer some improvements over version 8, but I am not 100 sure about that.
Dec 11 '07 #4
Thanks for the information to list the alternate server information.
I see that it is set properly. I've found that a connection is
automatically re-established to the same primary server, if the
connection is lost. However, if I try the following, I still get the
SQL30081 error:
1) connect to hadr primary database
2) execute a hadr switch roles
3) execute a query, which should result in a connection to the new
primary

Is there anything else I need to set-up in this case? I've set the
client registry settings for the number of connection retry attempts
and the interval. Thanks.
Dec 11 '07 #5

<hu***********@gmail.comwrote in message
news:44**********************************@d61g2000 hsa.googlegroups.com...
Thanks for the information to list the alternate server information.
I see that it is set properly. I've found that a connection is
automatically re-established to the same primary server, if the
connection is lost. However, if I try the following, I still get the
SQL30081 error:
1) connect to hadr primary database
2) execute a hadr switch roles
3) execute a query, which should result in a connection to the new
primary

Is there anything else I need to set-up in this case? I've set the
client registry settings for the number of connection retry attempts
and the interval. Thanks.

Dec 12 '07 #6
<hu***********@gmail.comwrote in message
news:44**********************************@d61g2000 hsa.googlegroups.com...
Thanks for the information to list the alternate server information.
I see that it is set properly. I've found that a connection is
automatically re-established to the same primary server, if the
connection is lost. However, if I try the following, I still get the
SQL30081 error:
1) connect to hadr primary database
2) execute a hadr switch roles
3) execute a query, which should result in a connection to the new
primary

Is there anything else I need to set-up in this case? I've set the
client registry settings for the number of connection retry attempts
and the interval. Thanks.
That's not exactly how it works. Try this from a DB2 command window:

1) Connect to the primary HADR db.
2) Issue a select statement.
3) Switch roles (issue takeover command on standby)
4) Issue another select statement. You will get an error message saying that
a takeover has occurred and asking you to retry the last SQL statement (I
don't recall the error number or exact text).
5) Retry the last query executed (it should work this time, getting data
from the standby).

If the above does not work, then you do have some sort of problem. Try
cataloging the database on the standby server (which is now primary) as a
type 2 connection and try to connect from DB2 command window. If that does
not work, make sure you can connect to the standby (now primary) as a local
user on the standby database server.
Dec 12 '07 #7
Well, my explanation wasn't clear, but I tried exactly what you had
suggested from the DB2 command window. After the role switch, the
connection is not established to the new primary. The alternate
server and port information is correct in the list db information,
however.

I also tried the second test you suggested, and that also fails with
the sql30081 error. One thought I had is if both servers require the
same user id and password for the connection. I can't update the
passwords right now to match, or I'd try.

Thanks again.
>
1) Connect to the primary HADR db.
2) Issue a select statement.
3) Switch roles (issue takeover command on standby)
4) Issue another select statement. You will get an error message saying that
a takeover has occurred and asking you to retry the last SQL statement (I
don't recall the error number or exact text).
5) Retry the last query executed (it should work this time, getting data
from the standby).

If the above does not work, then you do have some sort of problem. Try
cataloging the database on the standby server (which is now primary) as a
type 2 connection and try to connect from DB2 command window. If that does
not work, make sure you can connect to the standby (now primary) as a local
user on the standby database server.
Dec 12 '07 #8
<hu***********@gmail.comwrote in message
news:62**********************************@q3g2000h sg.googlegroups.com...
Well, my explanation wasn't clear, but I tried exactly what you had
suggested from the DB2 command window. After the role switch, the
connection is not established to the new primary. The alternate
server and port information is correct in the list db information,
however.

I also tried the second test you suggested, and that also fails with
the sql30081 error. One thought I had is if both servers require the
same user id and password for the connection. I can't update the
passwords right now to match, or I'd try.

Thanks again.
Yes, the user ids and passwords must match. Everything about the two
databases should be the same including all the tablesapce container paths
(or else certain DDL statements will not work).

It is not absolutely necessary for the instance names to be the same, but it
is recommended (especially now that TSA allows them to be the same).
Obviously, you can only do this if you have 2 different host names for
primary and standby.
Dec 12 '07 #9
Is your original type 2 connection using TCP/IP ? Automatic Client
Reroute support is only provided for TCP/IP connections. If you are
using the type 2 via local (IPC) connectivity no re-routing will be
done. Please make sure you've cataloged a database alias that connects
using TCP/IP to the database.

Please provide your connectivity information (i.e db2 list db directory
if not using connection strings).

hu***********@gmail.com wrote:
Well, my explanation wasn't clear, but I tried exactly what you had
suggested from the DB2 command window. After the role switch, the
connection is not established to the new primary. The alternate
server and port information is correct in the list db information,
however.

I also tried the second test you suggested, and that also fails with
the sql30081 error. One thought I had is if both servers require the
same user id and password for the connection. I can't update the
passwords right now to match, or I'd try.

Thanks again.
>1) Connect to the primary HADR db.
2) Issue a select statement.
3) Switch roles (issue takeover command on standby)
4) Issue another select statement. You will get an error message saying that
a takeover has occurred and asking you to retry the last SQL statement (I
don't recall the error number or exact text).
5) Retry the last query executed (it should work this time, getting data
from the standby).

If the above does not work, then you do have some sort of problem. Try
cataloging the database on the standby server (which is now primary) as a
type 2 connection and try to connect from DB2 command window. If that does
not work, make sure you can connect to the standby (now primary) as a local
user on the standby database server.
Dec 12 '07 #10
I got a window to change the password, and now I'm all set. Thanks
very much for all of your help!
Yes, the user ids and passwords must match. Everything about the two
databases should be the same including all the tablesapce container paths
(or else certain DDL statements will not work).
Dec 12 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sirano | last post by:
Hello, I'll want automatic upload pictures from a specified folder to the internet with PHP code. Or does somebody know a Website where I could find an answer for this. Thanks, Sirano
3
by: Mark Goldin | last post by:
Is it possible using mailto: to create an email with everything except an attachment and then when a user clicks on send intercept that form and recreate the email on the server and add a file to...
1
by: Mark | last post by:
Here is a description of automatic client reroute in DB2 V8.2 "The automatic client reroute feature allows client applications to recover from a loss of communication with the server so that they...
1
by: Anthony C | last post by:
This doesn't happen on my development machine (code works perfectly) but on the client's machine, I get an error reported that "too many automatic redirections". I've tried setting the maximum to a...
3
by: Pab | last post by:
I'm trying to use the client reroute feature of the DB2 Universal JDBC driver. I found documentation on this in the "Application Development Guide: Programming Client Applications" in the section...
1
by: Philip Bondi | last post by:
Hello to all SQL Server junkies who work with non-English characters: For people running scripts from the command line using ANSI files with special characters, it is very important to use isql...
0
by: Mark A | last post by:
A consultant has recommended to us that we use virtual IP addresses for our HADR databases (the virtual IP address is moved when the primary database is moved to other server), even though...
2
by: ray | last post by:
I have a client that doesn't want Access to automatically repair into a backup file if it crashes (and it crashes only on very rare occasions). My (sketchy) understanding is that this is a...
2
by: Laurence | last post by:
Hi there, Anybody knows should I also implement Automatic Client Reroute if I did HACMP and DB2 HADR on AIX? Thanks in advance,
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.