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
Like this:
Like Loading...
Related
Published by Osama Mustafa
Osama considered as one of the leaders in Cloud technology, DevOps and database in the Middle-East. I have more than ten years of experience within the industry. moreover, certfied 4x AWS , 4x Azure and 6x OCI, have also obtained database certifications for multiple providers.
In addition to having experience with Oracle database and Oracle products, such as middle-ware, OID, OAM and OIM, I have gained substantial knowledge with different databases.
Currently, I am architecting and implementing Cloud and DevOps. On top of that, I'm providing solutions for companies that allow them to implement the solutions and to follow the best practices.
View all posts by Osama Mustafa