Question

Primary DB: 11.2.0.3 Enterprise
Standby DB: 12.1.0.2 Enterprise

I've found several articles on making changes on a Physical Standby DB, but I've been having difficulty locating how to enable user testing on a Transient Logical Standby DB (then flashing back their changes and re-enabling log transport and SQL Apply after the testing has been completed).

Based on what I know of Logical Standby Databases, I wrote up the following procedures. However, this is untested since if I botch up the Standby DB, I can't simply re-duplicate the DB through RMAN since the database versions are different. I'll essentially have to re-clone the Primary DB, reconfigure the Standby for dataguard, upgrade the Standby DB version, etc, etc... basically, a lot of work that I would prefer to avoid, if possible...

If someone who has had experience with this can look over my below procedures and let me know if i'm forgetting anything, or what potential issues/caveats I should watch out for or be aware of, I would greatly appreciate it:

*note: the primary => standby log transport is specified in log_archive_dest_3

PRIMARY
alter system set log_archive_dest_state_3=defer scope=both;

STANDBY
alter database stop logical standby apply;
alter database guard none;
alter database flashback on;
create restore point before_testing guarantee flashback database;

*AFTER TESTING IS DONE*

STANDBY
flashback database to restore point 'before_testing';
drop restore point before_testing;
alter database flashback off;
alter database guard all;
alter database start logical standby apply immediate;

PRIMARY
alter system set log_archive_dest_state_3=enable scope=both;
Was it helpful?

Solution

My procedures seem valid... I was able to test the logical DB, then bring it back into an exact copy Logical Standby and re-enable SQL Apply without issues.

However, there was a minor change to my procedures: flashback database requires that the DB is in mount state and that alter database open requires resetlogs or noresetlogs.

Therefore, the amended procedures are as follows:

PRIMARY
alter system set log_archive_dest_state_3=defer scope=both;

STANDBY
alter database stop logical standby apply;
alter database guard none;
alter database flashback on;
create restore point before_testing guarantee flashback database;

*AFTER TESTING IS DONE*

STANDBY
shutdown immediate;
startup mount;
flashback database to restore point 'before_testing';
alter database open resetlogs;
alter database guard all;
alter database start logical standby apply immediate;
drop restore point before_testing;
alter database flashback off;

PRIMARY
alter system set log_archive_dest_state_3=enable scope=both;

OTHER TIPS

You're talking about Snapshot Standby here. Have a look at:

http://www.oracle.com/technetwork/testcontent/usingsnapshot-088081.html

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top