title: Convert physical standby to standalone database
body: <p>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.  </p>
  
  <p>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).</p>
  
  <p>My gameplan is to activate the standby database by "simulating" a failover (without the primary actually failing, of course), following instructions here:<br>
  <b>8.2.2 Performing a Failover to a Physical Standby Database</b>
  <a href="http://docs.oracle.com/cd/E11882_01/server.112/e41134/role_management.htm#SBYDB5176" rel="nofollow">http://docs.oracle.com/cd/E11882_01/server.112/e41134/role_management.htm#SBYDB5176</a></p>
  
  <p>This would entail running following on primary:</p>
  
  <pre><code>SQL&gt; SHUTDOWN IMMEDIATE;
  SQL&gt; STARTUP MOUNT;
  SQL&gt; ALTER SYSTEM FLUSH REDO TO target_db_name;
  </code></pre>
  
  <p>And then, if no errors, running this on standby:</p>
  
  <pre><code>SQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
  SQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
  
  SQL&gt; SELECT SWITCHOVER_STATUS FROM V$DATABASE;
       (confirm result is TO PRIMARY or SESSIONS ACTIVE)
  
  SQL&gt; ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
  </code></pre>
  
  <p>Then, on both primary and standby, bring up in OPEN mode and disable further replication:</p>
  
  <pre><code>SQL&gt; ALTER DATABASE OPEN;
  SQL&gt; ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='';
  </code></pre>
  
  <p>I have 3 problems/questions with this approach:
  <li> As a general statement, this feels a little overly complex - is there a more direct way to do this?  For example, I'd like to be able to do this without having to shutdown primary database (which is required in order to run <code>ALTER SYSTEM FLUSH REDO TO target_db_name;</code>).
  <li> Current output of <code>SELECT SWITCHOVER_STATUS FROM V$DATABASE;</code> on standby is "NOT ALLOWED".  I assume this status will change with the <code>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;</code> but would like confirmation of this, as I don't want to find myself in trouble-shooting mode.
  <li> Is <code>ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='';</code> the clean way to shutdown replication?  Should I instead <code>ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2='disable'</code>?</p>