I have a standard configuration of the primary / physical reserve (one primary, one standby) and I would like to completely break the connection between the primary and backup; conversion of the physical reserve into a development database that is separate from the primary / production system.
It seems like this should be pretty trivial, but actually there aren't any documented procedures that I can find (most of which focus on switching to standby for recovery purposes).
My game plan is to activate the backup database, "simulating" the transition to another resource (without an initial actual failure, of course), following the instructions here:
8.2.2 Performing a rollback in the physical backup database
http://docs.oracle.com/cd /E11882_01/server.112/e41134/role_management.htm#SBYDB5176
This will entail the following:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER SYSTEM FLUSH REDO TO target_db_name;
And then, if there are no errors, run this in standby mode:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
(confirm result is TO PRIMARY or SESSIONS ACTIVE)
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
Then, both in standby mode and in standby mode, activate OPEN mode and disable further replication:
SQL> ALTER DATABASE OPEN;
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='';
I have 3 problems / questions with this approach:
As a general statement, this is a little more complicated - is there a more direct way to do this? For example, I would like to be able to do this without having to stop the primary database (which is required to run ALTER SYSTEM FLUSH REDO TO target_db_name;). Current output SELECT SWITCHOVER_STATUS FROM V$DATABASE;in standby mode "NOT ALLOWED". I assume that this status will change with help ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;, but I would like to confirm this, since I do not want to be in shooting mode. Is a ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='';clean way to stop replication? Should I instead ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2='disable'?
source
share