Operating System - HP-UX
1839989 Members
2493 Online
110158 Solutions
New Discussion

Oracle Dataguard - managed with SG packages

 
Thomas J. Harrold
Trusted Contributor

Oracle Dataguard - managed with SG packages

I'm in the process of working with a DBA to setup a remote Oracle DataGuard environment to protect a critical database.

The source database at the primary site is already in a serviceguard package. The DR site is on the same logical subnet - which should make things easier for the end users.

I would like to setup dataguard and have switchover controlled from within a serviceguard package. I assume that others have done this, so I'm looking for some tips.

My first thoughts: I'd create a new SG package on the primary cluster that would do everything just like the production package, but would NOT present the production IP, and would issue a DataGuard broker command to initiate a switchover.

I look forward to hearing about your proven solutions.

-tjh
I learn something new everyday. (usually because I break something new everyday)
4 REPLIES 4

Re: Oracle Dataguard - managed with SG packages

Doing it all with the broker would be nice, as all you'd have to do would be to get each database instance to a mount state and then let the broker figure out who is the primary and who is the standby. That's almost too easy in that it requires a minor change to the oracle start scripts and making sure dg_broker_start is set to true in the databases parameters.

Unfortunately there's a very big fly in the ointmnent... oracle doesn't support the dataguard broker with any failover cluster except their own clusterware or with oracle RAC. There's a metalink article on this if you search in metalink for "dataguard broker cold failover cluster".

So that leaves you having to use the old fashioned SQL commands and some home-made mechanism for determining who is the primary and who is the standby... there's different ways of doing this, but typically I've seen it done with a seperate "control package" - that is you have the normal database packages that get the 2 databases to mount state and then you have seperate control packages that are dependent on your database packages. These control packages need to use some mechanism to determine who is primary and who is standby and then configure the databases appropriately using standard SQL commands ("alter database open" for the primary and "alter database recover managed standby ..." for the standby)

It isn't straightforward or simple I'm afraid - in some cases people feel more comfortable just using a flag file to determine who is primary and who is standby and let the DBAs manage the flag files...

Hope vthat gives you some ideas...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Thomas J. Harrold
Trusted Contributor

Re: Oracle Dataguard - managed with SG packages

I'll try to dig up that metalink article, but I've come to realize that "unsupported by oracle" doesn't necessarily mean that it won't work. :)
I learn something new everyday. (usually because I break something new everyday)

Re: Oracle Dataguard - managed with SG packages

Thomas,

Certainly any version before 10.2.0.4 it didn't work with, cos I've tried it. The physical hostname gets written into dataguard brokers configuration file. Failover yhe database to the other cluster node and the broker just won't start right.

From 10.2.0.4 onwards? I'm not so sure - that's the version that Oracle fixed it for Oracle Clusterware in. So I guess it depends how they fixed it... if it works let us all know.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Thomas J. Harrold
Trusted Contributor

Re: Oracle Dataguard - managed with SG packages

Doesn't look good for 10.2.0.4 - seems to have the hostname set as part of the DG broker config. Argh.

-tjh
I learn something new everyday. (usually because I break something new everyday)