Home » Server Options » Data Guard » V$STANDBY_STATUS
icon5.gif  V$STANDBY_STATUS [message #240356] Thu, 24 May 2007 12:13 Go to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

DG 9.2 states that the SWITCHOVER_STATUS column must read as follows to perform a switchover:

SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
-----------------
TO STANDBY
1 row selected

The value I always see is "SESSIONS ACTIVE" (because I am logged on, for one). Is there a trick to this (like starting the database in NOMOUNT mode)?

Thanks,

Mike
Re: V$STANDBY_STATUS [message #240358 is a reply to message #240356] Thu, 24 May 2007 12:14 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

And, here are the sessions:

SQL> select username from v$session;

USERNAME
------------------------------










SYS

USERNAME
------------------------------


12 rows selected.

Re: V$STANDBY_STATUS [message #240359 is a reply to message #240356] Thu, 24 May 2007 12:17 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
mike could you explain it?i didnt get you.

Thanks.
Re: V$STANDBY_STATUS [message #240666 is a reply to message #240356] Fri, 25 May 2007 08:07 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

According to online documentation at http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96653/role_management.htm#1024109, the SWITCHOVER_STATUS value in V$DATABASE should read "TO STANDBY", verifying that it is possible to do a Switchover on the Primary Database.

However, when I query SWITCHOVER_STATUS, I see "SESSIONS ACTIVE" instead of "TO STANDBY". Further reading shows that "SESSIONS ACTIVE" indicates that there are current sessions on the database which must be closed prior to a Switchover.

The issue is: there will always be a session active if I am connected to an open database as SYS. I don't see any way to achieve the "TO STANDBY" state if the database is open, and I'm thinking I may have to startup nomount if I want there to be no sessions active.

Mike
Re: V$STANDBY_STATUS [message #240685 is a reply to message #240356] Fri, 25 May 2007 09:08 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

Even with the database MOUNTED (not OPEN), I still get "SESSIONS ACTIVE". So, I'm still unable to get to "TO STANDBY" on the Primary Database. I'll probably try the switchover anyway, just to see what happens.

SQL> startup nomount;
SQL> alter database mount;

Database altered.

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS
------------------
SESSIONS ACTIVE
Re: V$STANDBY_STATUS [message #240744 is a reply to message #240685] Fri, 25 May 2007 11:10 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
i guess we have to run this command

Alter Database Commit to Switchover to PRIMARY with session Shutdown;
It would kill our active session.
What you think mike??
Re: V$STANDBY_STATUS [message #240747 is a reply to message #240356] Fri, 25 May 2007 11:24 Go to previous messageGo to next message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

I didn't see that in the documentation, but I did see sessions getting shut down in the alert log:

...
Fri May 25 11:01:37 2007
Active process 25347 user 'oracle' program 'oracle@mwith6 (CJQ0)'
CLOSE: waiting for server sessions to complete.
CLOSE: all sessions shutdown successfully.
Fri May 25 11:01:38 2007
SMON: disabling cache recovery
...

I'm wondering if I can ignore the "SESSIONS ACTIVE" state altogether: it did put the database in Physical Standby Database mode (see DATABASE_ROLE in v$database). On a side note, it makes the UNIX server unavailable (until I power cycle the firewall).

Re: V$STANDBY_STATUS [message #240758 is a reply to message #240356] Fri, 25 May 2007 12:04 Go to previous message
mlgoins
Messages: 116
Registered: March 2007
Location: Denver, CO
Senior Member

Well, it doesn't shut down access to the UNIX server anymore (don't know what's different, but it doesn't matter here). Carrying on this thread in "Switchover stuff" topic. Going to figure out what needs done on the Standby before you can switch it to Primary.
Previous Topic: Change the location of archive file to new location for Primary DB.
Next Topic: 12TB Data Guard Standby on a Wide Area Network
Goto Forum:
  


Current Time: Sat Apr 19 04:47:28 CDT 2014

Total time taken to generate the page: 0.12232 seconds