Oracle Restart turning on Active Data Guard
Hello
Version: 11.2.0.3, Enterprise Edition
OS: RHEL6
Setup:
1x single instance primary
1x single instance physical standby
FSFO enable
Mode = Max Availability
I have setup a database with a physical standby as above. Being 11gR2 I have installed Grid Infrastructure first and added both databases into Oracle Restart. Also created a service which is started on either database becoming primary.
However, I am finding the databases prone to opening in "READ ONLY WITH APPLY" which is Active Data Guard as far as I'm aware. We have not paid for this so I'd like to stop it happening before I move onto the live machines (currently in test).
I think this is something to do with the Oracle Restart settings but cannot see exactly what I've done wrong. I added the database resources like this:
$> srvctl add database -d prim1 -o /home/path -r PRIMARY -s OPEN
$> srvctl add database -d stby1 -o /home/path -r PHYSICAL_STANDBY -s MOUNT
If I switch over from prim1 to stby1 then the role part moves i.e.
$> srvctl config database -d stby1
on the standby host will show
Database role: PRIMARY
but the start option remains as mount (and likewise it remains as open on the old primary host):
Start options: mount
So an example:
host1 is up and prim1 is runnning on it as primary. Restart knows the database is primary and has a desired start of "open". If I reboot host1 then the failover occurs successfully to host2 and stby1 database comes up as primary. The problem is, when host1 comes back up, prim1 is started as:
DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE
------------------------------ -------------------- ----------------
prim1 READ ONLY WITH APPLY PHYSICAL STANDBY
which I am thinking is due to Restart ostill having this: "Start options: open"
This also happens if I have switched over first so it's not just a by product of an untidy reboot.
This is probably a simple oversight on my part but I’m currently stumped by it. Any ideas welcome at this stage.
thanks
Mark