Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HDR and Client Redirection

13 views
Skip to first unread message

Joachim Klassen

unread,
Mar 14, 2006, 4:19:38 AM3/14/06
to
Hi all,

I currently set up a HDR environment with IDS 10.0 on Suse Linux/Power.
Works like a charm.

Next thing I need to investigate is how to redirect the cleints to the
new primary after a failover. Coming from DB2 I would prefer the method
where I specify the alternate server via DBPATH environment variable at
the client side(looks similar to DB2's client rerouting for me). This
works fine as long as the failed primary is down. But when I
reintegrate the former primary as new standby I run into problems. The
new standby will go online in "Read Only" mode - thus the clients will
connect to him because their INFORMIXSERVER variable still contains its
name.

Am I missing something here or is this works as designed ?
Can I prevent the secondary from being read-only ?
Which method for client redirection do you use out there ?

I searched the docs that I know - but found only 2 chapters in IDS
Admin Guide. Any other docs available ?

TIA for any answer

Joachim

Karl Ostner

unread,
Mar 14, 2006, 6:01:48 AM3/14/06
to Joachim Klassen, informix-l...@iiug.org, inform...@iiug.org
Joachim,

you can do it this way:

sqlhosts file:
myServer group - -
myServer1 onsoctcp myHost1 myPort1 g=myServer
myServer2 onsoctcp myHost2 myPort2 g=myServer

setup HDR pair using myServer1 and myServer2.

for your client, set INFORMIXSERVER=myServer


HTH,

Karl Ostner


"Joachim Klassen"
<JoKlassen@email.
com> To
Sent by: inform...@iiug.org
informix-list-bou cc
nc...@iiug.org
Subject
HDR and Client Redirection
03/14/2006 10:19
AM




Hi all,

TIA for any answer

Joachim

_______________________________________________
Informix-list mailing list
Inform...@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list


Obnoxio The Clown

unread,
Mar 15, 2006, 5:31:04 AM3/15/06
to Karl Ostner, inform...@iiug.org

Karl Ostner said:
> Joachim,
>
> you can do it this way:
>
> sqlhosts file:
> myServer group - -
> myServer1 onsoctcp myHost1 myPort1 g=myServer
> myServer2 onsoctcp myHost2 myPort2 g=myServer
>
> setup HDR pair using myServer1 and myServer2.
>
> for your client, set INFORMIXSERVER=myServer

That is documented to work as far as ER is concerned, but TFM does not
explicitly say that it's OK for application use. I would love this to work
for everything, can someone confirm whether it's a documentation issue or
whether it's not supported for application use.

--
Bye now,
Obnoxio

"It's easier with pictures."
-- Cosmo

"But wait, it gets worse."
-- Cosmo

"Run, don't walk, for the nearest exit."
-- Cosmo

Richard Harnden

unread,
Mar 15, 2006, 8:49:11 AM3/15/06
to
Obnoxio The Clown wrote:
> Karl Ostner said:
>
>>Joachim,
>>
>>you can do it this way:
>>
>>sqlhosts file:
>>myServer group - -
>>myServer1 onsoctcp myHost1 myPort1 g=myServer
>>myServer2 onsoctcp myHost2 myPort2 g=myServer
>>
>>setup HDR pair using myServer1 and myServer2.
>>
>>for your client, set INFORMIXSERVER=myServer
>
>
> That is documented to work as far as ER is concerned, but TFM does not
> explicitly say that it's OK for application use. I would love this to work
> for everything, can someone confirm whether it's a documentation issue or
> whether it's not supported for application use.
>

No, I can't.

But it seems to work for Art, and I'm sure he has a stricter environment
than most...

"Taking care of Fail Back in HDR"

<http://groups.google.co.uk/group/comp.databases.informix/browse_frm/thread/4808b19991edb2e7/a414783c8f7c9649?q=Taking+care+of+Fail+Back+in+HDR&rnum=1#a414783c8f7c9649>

Art Kagel wrote:
#There is another option. Define a group in the sqlhosts file, much as
#you would from ER, include both servers in the group with the primary
#server listed first. Make the 'e=' entry name the backup server. When
#the primary goes down any application just needs to reconnect when it
#detects the loss of connection, reprepare any statements and redeclare
#cursors and voila! You're back in business.

and:
#OH! Forgot to mention. You would set INFORMIXSERVER or the
#'@servername' clause in a CONNECT TO statement to point to the group
#rather than one of the replicants.


Obnoxio The Clown

unread,
Mar 15, 2006, 10:08:35 AM3/15/06
to richard...@lineone.net, inform...@iiug.org, doc...@us.ibm.com

So, it's a document omission, then?

Art S. Kagel

unread,
Mar 20, 2006, 5:31:19 PM3/20/06
to Obnoxio The Clown, inform...@iiug.org, Karl Ostner
Obnoxio The Clown wrote:
> Karl Ostner said:
>
>>Joachim,
>>
>>you can do it this way:
>>
>>sqlhosts file:
>>myServer group - -
>>myServer1 onsoctcp myHost1 myPort1 g=myServer
>>myServer2 onsoctcp myHost2 myPort2 g=myServer
>>
>>setup HDR pair using myServer1 and myServer2.
>>
>>for your client, set INFORMIXSERVER=myServer
>
>
> That is documented to work as far as ER is concerned, but TFM does not
> explicitly say that it's OK for application use. I would love this to work
> for everything, can someone confirm whether it's a documentation issue or
> whether it's not supported for application use.
>

It works in all applications with or without ER running. We began to use
this when DBPATH was broken in CSDK 2.60 or so (forget the release) and have
never wanted to go back. It's much more elegant and the DBAs have control
over the failover cascades. With DBPATH you're at the user's mercy:

User: "The primary server crashed and I can still connect to the database
with dbaccess through the backup server. Why isn't my application connecting?"

DBA: "What's the app?"

User: "We just run flugelhorn.exec!"

DBA: "Hmm, flugelhorn.exec works for me!"

User: "Well it doesn't work out of the cron script that starts it up hourly!"

DBA: "<sigh> What's the name of the cron script?"

User: "NotATrumpet.ksh"

DBA: "The NotATrumpet.ksh script sets DBPATH to the old backup server
explicitely after running the environment setup script. That server was
replaced 5 years ago!"

User: "Well that script's been working fine for 7 years! What did you do to
break it now?"

Art S. Kagel

Art S. Kagel

unread,
Mar 20, 2006, 5:31:19 PM3/20/06
to Obnoxio The Clown, Karl Ostner, inform...@iiug.org
Obnoxio The Clown wrote:
> Karl Ostner said:
>
>>Joachim,
>>
>>you can do it this way:
>>
>>sqlhosts file:
>>myServer group - -
>>myServer1 onsoctcp myHost1 myPort1 g=myServer
>>myServer2 onsoctcp myHost2 myPort2 g=myServer
>>
>>setup HDR pair using myServer1 and myServer2.
>>
>>for your client, set INFORMIXSERVER=myServer
>
>
> That is documented to work as far as ER is concerned, but TFM does not
> explicitly say that it's OK for application use. I would love this to work
> for everything, can someone confirm whether it's a documentation issue or
> whether it's not supported for application use.
>

It works in all applications with or without ER running. We began to use

Madison Pruet

unread,
Mar 20, 2006, 7:56:44 PM3/20/06
to
All

We changed the behaviou of connecting via the group as part of the ER/HDR
logic that we put into 9.4 so that it would ensure that the 'primary' server
would be the one that we connected to any time that we connected to the
group. Made the change in both client->server connection logic and in
distributed transactions connection logic.

If you want to use this technique, you might also want to consider setting
INFORMIXCONTIME down low as well so that you don't end up waiting too long
on a primary server that isn't there.


M.P.
"Art S. Kagel" <ka...@bloomberg.net> wrote in message
news:441F2D37...@bloomberg.net...

keshav...@gmail.com

unread,
Mar 21, 2006, 4:51:22 PM3/21/06
to
This is a documentation issue. It'll take sometime to get this info
into documentation.

cheers,

Keshav.

Nog

unread,
Mar 30, 2006, 3:30:29 PM3/30/06
to
Does This work for ids 7.3x. I'll give it a go anyway as this could be
very useful to me.

0 new messages