Home » Server Options » Data Guard » switchover from primary db to standby (9.0.2.0.0)
switchover from primary db to standby [message #282865] Sat, 24 November 2007 05:47 Go to next message
M.Shakeel Azeem
Messages: 226
Registered: September 2006
Senior Member
Dear All,
i want to test switchover from primary DB to standby DB
AT Primary DB
SQL> conn sys/gateway@prim1 as sysdba
Connected.
SQL> select database_role,switchover_status
2 from v$database;

DATABASE_ROLE SWITCHOVER_STATUS
---------------- ------------------
PRIMARY SESSIONS ACTIVE

At standby DB
SQL> select database_role,switchover_status
2 from v$database;

DATABASE_ROLE SWITCHOVER_STATUS
---------------- ------------------
PHYSICAL STANDBY NOT ALLOWED

SWITCHOVER_STATUS is showing not allowed?
please suggest!
Re: switchover from primary db to standby [message #282871 is a reply to message #282865] Sat, 24 November 2007 06:53 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

http://download.oracle.com/docs/cd/B14117_01/server.101/b10823/role_management.htm#1024092
Re: switchover from primary db to standby [message #283282 is a reply to message #282871] Mon, 26 November 2007 10:35 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
Quote:

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.

Re: switchover from primary db to standby [message #283386 is a reply to message #283282] Tue, 27 November 2007 00:23 Go to previous messageGo to next message
M.Shakeel Azeem
Messages: 226
Registered: September 2006
Senior Member
DreamzZ
thanx a lot for ur so much cooperation
it was really helpful for me
thanx again
Re: switchover from primary db to standby [message #283630 is a reply to message #283386] Tue, 27 November 2007 14:58 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
You welcome brother.
Allah Hafiz
Re: switchover from primary db to standby [message #283678 is a reply to message #283630] Tue, 27 November 2007 23:13 Go to previous message
M.Shakeel Azeem
Messages: 226
Registered: September 2006
Senior Member
May i ask u abt good name Please

Allah Hafiz
Previous Topic: adding a tablespace in primary database
Next Topic: How to change a database_mode from primary to standby
Goto Forum:
  


Current Time: Thu Mar 28 09:21:35 CDT 2024