Oracle Articles, Oracle Tools, Oracle Tips, Database Articles and DBA Tips  

The Largest Online Resource for Oracle Articles, Oracle Tips, Oracle Scripts & Oracle Tools!!


Enter your Email:
 
Navigate at FreeMegaZone Home      Articles      Tools      Jobs      Games      Support      Submit Content      Advertise
Advertise at http://www.articles.freemegazone.com

Advertise at FreeMegaZone

Give tremendous boost to your business by advertising at FreeMegaZone. Contact webmaster@freemegazone.com

 


Rating: *****                                             Rate this article:    

 Author: Michael Jim

Page: 1 2 3

Being database administrators you might have faced the scenario where you have to perform a switchover from Primary to Standby in a RAC environment. Although it seems to be difficult but if you follow things in a right manner then you can accomplish this task effectively, quickly and in a much simpler way. So here we go with the right way!

Shutdown Instance:

First of all we will need to shut down the instance of standby that is not involved in the media recovery. You must ensure that all but one RAC instance on the standby databases in a RAC configuration are shut down.

During role transitions only one RAC instance on the standby database can be online for a RAC database. Before starting role transition you must shut down all other instances and then bring them back to online when your role transition is completed.

Ensure Synchronization:

Now you have to ensure that both your primary and standby databases are in synchronization.

Run SWITCHOVER on Primary:

At this stage if we run SWITCHOVER on instance 1 of the primary then we get ORA-01105 because we need to shutdown ALL but one instances on the primary side as well as the standby site.

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY with session shutdown;

ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY with session shutdown
*
ERROR at line 1:
ORA-01105: mount is incompatible with mounts by other instances

We will leave standby instance performing recovery running and shut down instance 2 on the primary site and run SWITCHOVER command again on instance 1 of the primary. Use the WITH SESSION SHUTDOWN option if you are unable to bring a few active internal processes down.

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
Database altered.

SQL> SHUTDOWN IMMEDIATE
STARTUP MOUNT
ORA-01507: database not mounted
ORACLE instance shut down.

SQL> ORACLE instance started.
Total System Global Area 1543503872 bytes
Fixed Size 2072960 bytes
Variable Size 369102464 bytes
Database Buffers 1157627904 bytes
Redo Buffers 14700544 bytes
Database mounted.

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;

     SWITCHOVER_STATUS
     ----------------------------------
        SESSIONS ACTIVE

Put Former Primary to Recovery Mode:

Now we will put the former primary that is our new standby after the switchover into recovery mode and make sure that the LOG_ARCHIVE_DEST parameters are set right.

SQL> SHOW PARAMETER LOG_ARCHIVE_DEST_1

     NAME                                TYPE                                                VALUE
---------------------------          -----------   -----------------------------------------------------------------------------------------------------------
log_archive_dest_1           string      service=PSTBY valid_for=(online_logfiles,primary_role) db_unique_name=PROD

Pointing PSTBY Service:

Previously the PSTBY service pointed to the standby server. But now it should re-point to the primary server. Now the old primary server will become our standby server. Continued...

Page: 1 2 3

 More Oracle Articles, Database Articles and DBA Tips
   Database Security: Step by step guideline
   SQL in Action I - Single Table Queries
   Why do we need a good database design?
   Oracle-SQL Guide: Look out for Fragmented Indexes
   Oracle – SQL: Performance Boost with Collections


FreeMegaZone Jobs!!

 

 
HOME      ABOUT US      SUPPORT      SITE MAP      PRIVACY POLICY      TERMS OF USE      SUBMIT CONTENT      ADVERTISE
Copyright © 2007 - 2010 Oriole Intellect Inc. All rights reserved.

The name Oracle is a trademark of Oracle Corporation. Any other names used on this website may be trademarks of their respective owners