Home » Server Options » Data Guard » Fail over to Secondary
Fail over to Secondary [message #279495] Thu, 08 November 2007 16:06 Go to next message
preet_kumar
Messages: 204
Registered: March 2007
Senior Member
Our Primary database Oracle 10g is located at main office with public IP and the physical standby is at branch office on a private IP due to which we are unable to setup automatic failover.
Using a script the secondary pulls the archivelogs from primary and applies it once a day.
If the primary goes down then we have to move the standby to main office and convert to primary.Will the below given step work to convert the secondary to primary

alter database commit to switchover to primary;
shutdown
startup
alter system archive log current;
Re: Fail over to Secondary [message #279498 is a reply to message #279495] Thu, 08 November 2007 17:07 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Manual Switchover:

On the PRIMARY Database: (Open stage)

Query V$DATABASE to check the role of Primary Database.

•SQL> Select Database_role
from v$Database;


It will return “PRIMARY”,

Now check the Switchover Status of the Primary Database.

•SQL> Select switchover_status
from v$Database;


It will return “SESSIONS ACTIVE”.

Now you are ready to perform a manual switchover. Execute the following command using “WITH SESSION SHUTDOWN” option.

•SQL> Alter Database Commit to Switchover to Physical Standby with session Shutdown;

Database Altered.

Now your PRIMARY Database has become Physical Standby. To verify this change, again query the Database_role column of V$DATABASE. Now it will return “PHYSICAL STANDBY”.

Shutdown the database and again Start it to mount stage.

On the PHYSICAL STANDBY Database: (Mount stage)

Query V$DATABASE to check the role of Standby Database.
•SQL> Select Database_role
from v$Database;


It will return “PHYSICAL STANDBY”,

Now check the Switchover Status of the Standby Database.

•SQL> Select switchover_status
from v$Database;


It will return “SESSIONS ACTIVE”.

Now cancel the MRP which is running in the background of the Standby Database. Execute the following command:
•SQL> Alter database Recover Managed Standby Database Cancel;

Database Altered.


Now you are ready to perform a manual switchover from Physical Standby to Primary. Execute the following command using “WITH SESSION SHUTDOWN” option.

•SQL> Alter Database Commit to Switchover to PRIMARY with session Shutdown;

Database Altered.


Now your PHYSICAL STANDBY Database has become PRIMARY. To verify this change, again query the Database_role column of V$DATABASE. Now it will return “PRIMARY”.

Shutdown the database and again Start it to Open stage.


See more details here

http://www.scribd.com/doc/138958/DATAGUARD-CONFIGURATION

http://www.scribd.com/search?query=dataguard+configuration
Re: Fail over to Secondary [message #279577 is a reply to message #279498] Fri, 09 November 2007 02:17 Go to previous message
preet_kumar
Messages: 204
Registered: March 2007
Senior Member
Thanks for the response.
The Steps which you have mentioned is for switchover as in my case the Primary is down so i only have Physical standby to convert to Primary.I think in my case i only have to follow 2nd step switching over Standby to primary.
Previous Topic: Live and Standby Database - OS Architecture
Next Topic: Replication of users/passwords by Data Guard?
Goto Forum:
  


Current Time: Sun Dec 22 21:59:42 CST 2024