Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Andrew Lemin needed a script on each host (HDR primary, HDR secondary, RSS) to find the primary's name through the local sysmaster. Madison Pruet suggested defining a server group so connections resolve to the primary, or using the connection manager. Andrew needed the explicit name, and Madison then said it can be obtained by querying sysmaster syscfg.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
ANDREW LEMIN — — source: IIUG Forums & Mailing Lists
Hello,
This is a peculiar one. We have a backup script that runs on every database
host (Linux).
We have an HDR Primary, an HDR Secondary and an RSS Secondary.
The script needs to connect to sysmaster on the local-host and find out who
the Primary database is? How can I do this?
Once it then has the name of the Primary IDS engine, the script connects to
the Primary database instead to update data etc.
We just don't know how to find the name of the primary database engine from
within sysmaster when we can't predict what mode the local-host IDS engine is
going to be in?
Thanks in advance.
↪ replying to ANDREW LEMIN
Madison Pruet — — source: IIUG Forums & Mailing Lists
Configure the three servers in a group as in...
my_cluster group - -
serv1 onsoctcp machine1 port1 g=my_cluster
serv2 oncoctcp machine2 port2 g=my_cluster
serv3 onsoctcp machine3 port3 g=my_cluster
Then simply connect to the group name "my_cluster".
The connection will resolve to the primary node.
Alternatively, use the connection manager.
From: "ANDREW LEMIN" <a_lemin@hotmail.com>
To: ids@iiug.org
Date: 03/23/2011 10:37 AM
Subject: Ask this server who the Primary is [23181]
Sent by: ids-bounces@iiug.org
Hello,
This is a peculiar one. We have a backup script that runs on every database
host (Linux).
We have an HDR Primary, an HDR Secondary and an RSS Secondary.
The script needs to connect to sysmaster on the local-host and find out who
the Primary database is? How can I do this?
Once it then has the name of the Primary IDS engine, the script connects to
the Primary database instead to update data etc.
We just don't know how to find the name of the primary database engine from
within sysmaster when we can't predict what mode the local-host IDS engine
is
going to be in?
Thanks in advance.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
↪ replying to Madison Pruet
ANDREW LEMIN — — source: IIUG Forums & Mailing Lists
Hello,
I was aware you could do this by connecting to a cluster defintion, however I
need to know explicitly who the primary database is as there are other
functions in the script that need this information.
Thank you very much for the suggestion though :)
Cheers, Andy.
↪ replying to ANDREW LEMIN
Madison Pruet — — source: IIUG Forums & Mailing Lists
You can get the site by quizing sysmaster syscfg.
From: "ANDREW LEMIN" <a_lemin@hotmail.com>
To: ids@iiug.org
Date: 03/23/2011 11:05 AM
Subject: Re: Ask this server who the Primary is [23183]
Sent by: ids-bounces@iiug.org
Hello,
I was aware you could do this by connecting to a cluster defintion, however
I
need to know explicitly who the primary database is as there are other
functions in the script that need this information.
Thank you very much for the suggestion though :)
Cheers, Andy.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.