Monday, November 19, 2012

Check DataGaurd Role Primary/Standby

Which Database is the primary Database , Which One Is the Standby

Simple Query Will Answer this , The Scenario Like the following I have Data Guard I want to check which one Of these database are Primary Or Standby How Can I do that :

SQL > select database_role from v$database;

DATABASE_ROLE
—————-
PRIMARY

The above Output Indicate that you are Now On Primary Database, Different Output for Standby

SQL > select database_role from v$database;

DATABASE_ROLE
—————-
PHYSICAL STANDBY

There's More than One Way
SQL> SELECT controlfile_type FROM V$database;

Output On Primary Database :

CONTROL
——–
CURRENT

On Standby :

CONTROL
——–
STANDBY

Thank you
Osama Mustafa

No comments:

Post a Comment