$sqlplus / as sysdba SQL> select database_role,open_mode,protection_mode from v$database; DATABASE_ROLE OPEN_MODE PROTECTION_MODE ---------------- -------------------- -------------------- PHYSICAL STANDBY READ ONLY WITH APPLY MAXIMUM PERFORMANCE SQL> select recovery_mode from v$archive_dest_status where recovery_mode !='IDLE'; RECOVERY_MODE ----------------------- MANAGED REAL TIME APPLY
We have a physical standby database with the Maximum Performance mode. The value of the OPEN_MODE
column is READ ONLY WITH APPLY
, which indicates that Active Data Guard is enabled. The output of the second query shows that real-time apply is being used as the recovery mode.
SQL> select name, value from v$dataguard_stats; NAME VALUE ------------------------- --------------- transport lag +00 00:00:00 apply lag +00 00:00:00 apply finish time estimated startup time 231
The output shows that we have a fully synchronized standby database, where there is no redo transport and apply lag. The estimated startup time value is 231 seconds, which is an estimate of the time needed to start and open the standby database.
$dgmgrl DGMGRL> connect sys/password; Connected. We have connected to the primary database with the sys user.Now we can check the configuration. DGMGRL> show configuration; Configuration - TEST Protection Mode: MaxPerformance Databases: Turkey - Primary database India - Physical standby database Fast-Start Failover: DISABLED Configuration Status: SUCCESS
show configuration
command. At the end of the output we see the configuration status as SUCCESS
, which means, everything in the broker configuration is working properly. However, we can also see a status of warning or error. We can also run the show database
command for some general information:DGMGRL> show database 'India'; Database Name: India Role: PHYSICAL STANDBY Enabled: YES Intended State: ONLINE Instance(s): india Current status for "India": SUCCESS
You have just seen examples of monitoring the Data Guard environment with three different interfaces. These examples are just intended to give you a first impression of what these interfaces look like. Properties and details of the tools in question will be covered in the next chapters.
All of these interfaces can be used to monitor and manage the Data Guard; however, they all have their own pros and cons. If you already use Enterprise Manager Cloud Control in your current IT infrastructure, Data Guard installations must be added as targets in order to take advantage of its visual and easy monitoring and management potential. If you don't have Cloud Control but have multiple Data Guard installations, you should think about using it to overcome the challenges of central monitoring.
In a Data Guard configuration we can see some Oracle Data Guard specific background processes in both, primary and standby databases. These processes perform the operations of redo transport and apply services. Data Guard broker also has some specific background processes. We can see the description and duties of the most important Data Guard processes as follows:
SYNC
mode is being used.