Steps
to manually switchover a primary database to standby or via versa:
Remember
you should have standby logfile on current
primary also.
Steps On the Primary Database:
SQL> connect / as sysdba
--Check the following parameters and write them down
SQL> show parameter aq_tm_processes
SQL> show parameter job_queue_processes
--Reset them to zero if there are not.
SQL> alter system set …=0;
--Make sure you are on Primary database
SQL> select database_role from v$database;
SQL> select switchover_status from v$database;
--Switch logfile and then change it physical standby and shutdown the database.
SQL> alter system switch logfile;
SQL> alter database commit to switchover to physical standby with session shutdown; to stop lns and mrp processes and disconnect all the sessions.
SQL> shutdown immediate;
Steps On the Physical Standby:
SQL> connect / as sysdba
--Change archive destination state to defer and switchover your standby to primary, then shutdown and startup the database.
SQL> alter system set log_archive_dest_state_2=defer;
SQL> alter database commit to switchover to primary;
SQL> shutdown immediate;
SQL> startup
Steps on the New Physical Standby:
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> recover managed standby database disconnect from session;
Steps On the New Primary database:
SQL> alter system set log_archive_dest_state_2=enable;
--Reset the job_queue_processes and aq_tm_processes values.
SQL> alter system set …..;
Steps On the Primary Database:
SQL> connect / as sysdba
--Check the following parameters and write them down
SQL> show parameter aq_tm_processes
SQL> show parameter job_queue_processes
--Reset them to zero if there are not.
SQL> alter system set …=0;
--Make sure you are on Primary database
SQL> select database_role from v$database;
SQL> select switchover_status from v$database;
--Switch logfile and then change it physical standby and shutdown the database.
SQL> alter system switch logfile;
SQL> alter database commit to switchover to physical standby with session shutdown; to stop lns and mrp processes and disconnect all the sessions.
SQL> shutdown immediate;
Steps On the Physical Standby:
SQL> connect / as sysdba
--Change archive destination state to defer and switchover your standby to primary, then shutdown and startup the database.
SQL> alter system set log_archive_dest_state_2=defer;
SQL> alter database commit to switchover to primary;
SQL> shutdown immediate;
SQL> startup
Steps on the New Physical Standby:
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> recover managed standby database disconnect from session;
Steps On the New Primary database:
SQL> alter system set log_archive_dest_state_2=enable;
--Reset the job_queue_processes and aq_tm_processes values.
SQL> alter system set …..;
No comments:
Post a Comment