Scenario 9: Monitoring a DG PDB Configuration

The SHOW CONFIGURATION, SHOW DATABASE, and SHOW PLUGGABLE DATABASE commands can be used to monitor the status of the members in a DG PDB configuration. The first two of these commands have optional VERBOSE qualifiers that provide more detailed information when these commands are executed and the latter has an ALL qualifier that can be used to provide summary information for all of the PDBs in the specified container database. The following commands can be used to check the status of the example DG PDB configuration members after the nyc_sales PDB has been reinstated at the end of Scenario 8: Failover to Target PDB. To check the overall state at the configuration level, use the SHOW CONFIGURATION command as in these examples:
DGMGRL> SHOW CONFIGURATION; 
Configuration - Boston 
   Protection Mode: MaxPerformance 
   Members: 
   boston - Primary database 
    newyork - Primary database in NewYork configuration 
Data Guard for PDB: Enabled in SOURCE role 
Configuration Status: 
SUCCESS (status updated 6 seconds ago) 

DGMGRL> SHOW CONFIGURATION VERBOSE NewYork; 
Configuration - NewYork 
   Protection Mode: MaxPerformance 
   Members: 
   newyork - Primary database 
     boston - Primary database in Boston configuration 
Properties: 
   FastStartFailoverThreshold       = '30' 
   OperationTimeout                 = '30' 
   TraceLevel                       = 'USER' 
   FastStartFailoverLagLimit        = '30' 
   CommunicationTimeout             = '180'  
   ObserverReconnect                = '0' 
   ObserverPingInterval             = '0' 
   ObserverPingRetry                = '0' 
   FastStartFailoverAutoReinstate   = 'TRUE' 
   FastStartFailoverPmyShutdown     = 'TRUE' 
   BystandersFollowRoleChange       = 'ALL' 
   ObserverOverride                 = 'FALSE' 
   ExternalDestination1             = '' 
   ExternalDestination2             = '' 
   PrimaryLostWriteAction           = 'CONTINUE' 
   ConfigurationWideServiceName     = 'newyork_CFG' 
   ConfigurationSimpleName          = 'NewYork' 
   DrainTimeout                     = '0' 
Data Guard for PDB: Enabled in TARGET role 
Fast-Start Failover: Disabled 
Configuration Status: 
SUCCESS 
To check status and configuration of the source and target container databases, use the SHOW DATABASE command as in these examples:
DGMGRL> SHOW DATABASE boston; 
Database - boston   
   Role:                  PRIMARY 
   Intended State:        TRANSPORT-ON 
   Redo Rate:             110 Byte/s in 15 seconds (computed 11 seconds ago) 
   PDB Data Guard Role:   SOURCE 
   Data Guard Source PDB(s): 1 
   Instance(s): 
     boston 

Database Status: 
SUCCESS 

DGMGRL> SHOW DATABASE VERBOSE newyork; 
Database - newyork 
   Role:                  PRIMARY 
   Intended State:        TRANSPORT-ON 
   PDB Data Guard Role:   TARGET 
   Data Guard Target PDB(s): 1   
   Instance(s): 
     newyork 
Properties: 
   DGConnectIdentifier             = 'newyork' 
   ObserverConnectIdentifier       = '' 
   FastStartFailoverTarget         = '' 
   PreferredObserverHosts          = '' 
   LogShipping                     = 'ON'   
   RedoRoutes                      = '' 
   LogXptMode                      = 'ASYNC' 
   DelayMins                       = '0' 
   Binding                         = 'OPTIONAL' 
   MaxFailure                      = '0' 
   ReopenSecs                      = '300' 
   NetTimeout                      = '30' 
   RedoCompression                 = 'DISABLE' 
   PreferredApplyInstance          = '' 
   ApplyInstanceTimeout            = '0' 
   ApplyLagThreshold               = '30'  
   TransportLagThreshold           = '30' 
   TransportDisconnectedThreshold  = '30' 
   ArchiveLocation                 = '' 
   AlternateLocation               = '' 
   StandbyArchiveLocation          = '' 
   StandbyAlternateLocation        = '' 
   InconsistentLogXptProps         = '(monitor)' 
   LogXptStatus                    = '(monitor)' 
   SendQEntries                    = '(monitor)' 
   RecvQEntries                    = '(monitor)' 
   HostName                        = 'nshga2710' 
   StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=nshga2710.us.example.com)(PORT=1521))
    (CONNECT_DATA=(SERVICE_NAME=newyork_DGMGRL.us.example.com)(INSTANCE_NAME=newyork)(SERVER=DEDICATED)))' 
   TopWaitEvents                   = '(monitor)' 
   SidName                         = '(monitor)' 
Log file locations: 
   Alert log                : /scratch/oracle/diag/rdbms/newyork/newyork/trace/alert_newyork.log 
   Data Guard Broker log    : /scratch/oracle/diag/rdbms/newyork/newyork/trace/drcnewyork.log 
Database Status: 
SUCCESS 
To check the state of all or some of the PDBs, use the SHOW PLUGGABLE DATABASE or SHOW ALL PLUGGABLE DATABASE commands:
DGMGRL> SHOW PLUGGABLE DATABASE nyc_sales AT newyork; 
Pluggable database - NYC_SALES at newyork 
Data Guard Role: Physical Standby 
Con_ID: 3 
Source: con_id 3 at boston 
Transport Lag: 0 seconds (computed 1 second ago) 
Apply Lag: 3 seconds (computed 1 second ago) 
Intended State: APPLY-ON 
Apply State: Running 
Apply Instance: newyork 
Average Apply Rate: 13 KByte/s 
Real Time Query: OFF 
Pluggable Database Status: 
SUCCESS 

DGMGRL> SHOW ALL PLUGGABLE DATABASE AT boston; 
PDB Name        PDB ID    Data Guard Role     Data Guard Partner 
BOS_SALES          3      Primary             NYC_SALES (con_id 3) at newyork 
BOS_ACCT           4      None                None 
BOS_FINANCE        5      None                None 

DGMGRL> SHOW ALL SOURCE PLUGGABLE DATABASE AT boston; 
PDB Name PDB ID Data Guard Role Data Guard Partner 
BOS_SALES 3 Primary NYC_SALES (con_id 3) at newyork 
The VALIDATE PLUGGABLE DATABASE command (used in Scenario 6: Configure Data Guard Protection for the Source PDB and Scenario 7: Switchover from Source PDB to Target PDB) provides additional information about the state of the PDBs in a CDB, for example:
DGMGRL> VALIDATE PLUGGABLE DATABASE nyc_sales AT newyork; 
   Ready for Switchover: YES 
   Data Guard Role: Physical Standby 
   Apply State: Running 
   Standby Redo Log Files: 4 
   Source: BOS_SALES (con_id 3) at boston 

DGMGRL> VALIDATE PLUGGABLE DATABASE bos_acct AT boston; 
DGM-17560: Pluggable database 'BOS_ACCT' at container database 'boston' is not protected.