I have a standard primary / physical-standby configuration (one primary, one standby), and would like to completely break the connection between primary and standby; converting physical standby to development database that is dissociated from primary/production system.
This seems like it should be fairly trivial, but doesn't really follow any documented procedures that I can find (most of which focus on switching over to standby for recovery purposes).
My gameplan is to activate the standby database by "simulating" a failover (without the primary actually failing, of course), following instructions here:
8.2.2 Performing a Failover to a Physical Standby Database
http://docs.oracle.com/cd/E11882_01/server.112/e41134/role_management.htm#SBYDB5176
This would entail running following on primary:
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER SYSTEM FLUSH REDO TO target_db_name;
And then, if no errors, running this on standby:
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, on both primary and standby, bring up in 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:
ALTER SYSTEM FLUSH REDO TO target_db_name;).
SELECT SWITCHOVER_STATUS FROM V$DATABASE; on standby is "NOT ALLOWED". I assume this status will change with the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH; but would like confirmation of this, as I don't want to find myself in trouble-shooting mode.
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2=''; the clean way to shutdown replication? Should I instead ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2='disable'?