Tuesday, January 15, 2019

The simplest way to see if your database is part of a data guard setup



Execute this query:
select * from v$dataguard_config;

DB_UNIQUE_NAME PARENT_DBUN DEST_ROLE CURRENT_SCN CON_ID
proddb01 NONE PRIMARY DATABASE
238029367683
0
proddb01_stby1 proddb01 PHYSICAL STANDBY
238029353772
0
In this example, I am logged into the database proddb01, the primary database.

The columnn PARENT_DBUN is interesting. It displays "DB_UNIQUE_NAME of the parent database, also known as the database that supplies live redo to the destination."

If executed on the standby database, the output will be reversed, but the principle the same.

Documentation for the view V$DATAGUARD_CONFIG can be found here

No comments:

Post a Comment