April 04, 2025

Oracle Data guard check configuration

 

How To check any Oracle Database is configured with data guard or not?

There are few ways to validate it within the database and at the OS level. The easiest way to check would be running a SQL query which is oracle built-in function and validate the status.


set serveroutput on
declare
  feature_boolean number;
  aux_count number;
  feature_info clob;
begin
  dbms_feature_data_guard(feature_boolean, aux_count, feature_info);
  dbms_output.put_line(feature_boolean);
  dbms_output.put_line(feature_info);
end;
/


Output will be like below:

If DataGuard is not configured:

0

Data Guard usage not detected


If DataGuard is configured:


1

Number of standbys: 1, Number of Cascading databases: 0, Number of Terminal

databases: 1, Redo Apply used: TRUE, SQL Apply used: FALSE, Far Sync Instance

used: FALSE, Snapshot Standby used: FALSE, Broker used: TRUE, Protection mode:

MAXIMUM PERFORMANCE, Log transports used: LGWR ASYNC, Fast Sync used: FALSE,

Fast-Start Failover used: FALSE, Real-Time Apply used: TRUE, Compression used:

FALSE, Flashback used: FALSE, Recovery Appliance used: FALSE


Alternate method:

create a session dgmgrl, connect to the database, in this example db1. 

DGMGRL> show configuration

Configuration - db1

  Protection Mode: MaxPerformance
  Members:
  db1 - Primary database
    db1_stby - Physical standby database

Fast-Start Failover:  Disabled

Configuration Status:
SUCCESS   (status updated 37 seconds ago)

 

Hope this helps, Thanks!!

No comments:

Post a Comment

If you have any queries/ any suggestion please do comment and let me know.

Recent Post

Check progress on expdp and impdp

 Check progress on expdp and impdp: In few cases we need to monitor the progress of an export or import job in oracle. below are the steps c...