Once you have done a switchover its a good idea to do a log switch and make sure the new primary and standby are working correctly. Once you have done that the step to switch back are as follows : ( Do not use if you have Data Guard Broker setup )
alter system set log_archive_dest_state_2=enable;
h3. Convert the primary database to the new standby
SQL> select switchover_status from v$database; Note:All v$database switchover_status values are shown at the bottom of this page. If SWITCHOVER_STATUS returns SESSIONS ACTIVE then you should either disconnect all sessions manually or when performing step 2 you should append the with session shutdown clause. For example: SQL> alter database commit to switchover to standby with session shutdown;
h3. Shutdown the former primary and mount as a standby database
SQL> alter database commit to switchover to standby with session shutdown; Note: This might take a few minutes.
h3. Defer the remote archive destination on the old primary
SQL> shutdown immediate Note: An ORA-01507: database not mounted is normal SQL> startup nomount SQL> alter database mount standby database;
h3. Verify that the physical standby can be converted to the new primary
SQL> alter system set log_archive_dest_state_2=defer;
h3. Convert the physical standby to the new primary ( step 6 )
QL> select switchover_status from v$database; SWITCHOVER_STATUS -------------------- TO PRIMARY Note that if the status returns SESSIONS ACTIVE then you should append the with session shutdown clause to the command in step 6.
h3. Shutdown and startup the new primary
SQL> alter database commit to switchover to primary;
h3. Enable remote archiving on the new primary to the new standby
SQL> shutdown immediate ORA-01109: database not open SQL> startup
h3. Start managed recover on the new standby database
SQL> alter system set log_archive_dest_state_2=enable;
SQL> recover managed standby database disconnect; Media recovery complete. SQL> Note: It’s a good idea to perform a log switch on the new primary. SQL>alter system switch logfile;
sql>alter database recover managed standby database cancel;Now open the standby database which would get opened in read-only mode.
sql>alter database open;Start the Recovery:
sql>alter database recover managed standby database disconnect from session;or
sql>alter database recover managed standby database disconnect from session using current logfile;You can refer this http://shivanandarao.wordpress.com/2012/03/19/how-to-setup-active-dataguard-in-oracle-11g/