VALIDATE DATABASE
The VALIDATE DATABASE command performs a comprehensive set
of checks prior to a role change. The command gives the option of running basic checks
indicating whether the specified standby is ready for switchover or failover. You may also
include a stricter level of checks using options available for the STRICT clause.
The checks use information available in various Oracle Data Guard views.
Format
VALIDATE DATABASE [VERBOSE] <db_unique_name>
[STRICT { ALL | APPLY_PROPERTY | DATAFILES_OFFLINE | FLASHBACK |
FORCE_LOGGING | LOG_FILES_CLEARED | LOG_FILE_CONFIGURATION |
PDBS_OFFLINE | PDB_SAVE_STATE | TRANSPORT_PROPERTY }];Command Parameters
Usage Notes
The VALIDATE DATABASE command shows a brief summary of the database,
and reports any errors or warnings that were detected. VALIDATE DATABASE
VERBOSE shows everything in the brief summary plus all items that were
validated.
To add a stricter level of validation use the STRICT clause and specify
one or more of the STRICT option.
Table 10-3 Options for STRICT Clause
| Option | Description |
|---|---|
ALL |
Use all of the strict options in the validation of the primary and specified standby database. |
APPLY_PROPERTY |
Check that the apply-related property settings between the primary and specified standby database are identical. |
DATAFILES_OFFLINE |
Check that the specified standby database does not have any data files that are offline. Datafiles that are offline are not updated with redo data received from the primary database. |
FLASHBACK |
Check that the primary and specified standby database have flashback database enabled. |
FORCE_LOGGING |
The primary and specified standby database have force logging enabled and whether there are any non-logged blocks on the primary database. |
LOG_FILES_CLEARED |
Check that the primary database's standby redo logs are cleared and the specified standby database (if it's a physical standby database) has its online logs cleared. |
PDBS_OFFLINE |
Check that the specified standby database does not have any pluggable databases that have recovery disabled. Pluggable databases that have recovery disabled are not an identical copy of the primary database’s pluggable database. |
PDB_SAVE_STATE |
Check whether save state is enabled for one or more pluggable databases on the primary database. In RAC environments, having save state enabled for a pluggable database may result in discrepancies between the services started by the database and the services that Oracle Clusterware is expected to start based upon database role. |
Command Examples
The examples in this section show what the VALIDATE DATABASE
command output might look like in both the brief and verbose forms for primary and standby
databases.
Example 10-18 VALIDATE DATABASE Output in Brief Format for a Primary
The following example shows brief output for a primary database:
DGMGRL> VALIDATE DATABASE South_Sales;
Database Role: Primary database
Ready for Switchover: Yes
Managed by Clusterware:
South_Sales: YES
Example 10-19 VALIDATE DATABASE Output in Brief Format for a Physical Standby
The following example shows brief output for a physical standby database:
DGMGRL> VALIDATE DATABASE North_Sales;
Database Role: Physical standby database
Primary Database: South_Sales
Ready for Switchover: Yes
Ready for Failover: Yes (Primary Running)
Managed by Clusterware:
South_Sales : NO
North_Sales: NO
The static connect identifier allows for a connection to database "South_Sales".
Parameter Settings:
Parameter South_Sales Value North_Sales Value
DB_BLOCK_CHECKING FALSE FALSE
DB_BLOCK_CHECKSUM TYPICAL TYPICAL
DB_LOST_WRITE_PROTECT AUTO AUTO
Example 10-20 VALIDATE DATABASE Output in Verbose Format for a Primary
The following example shows verbose output for a primary database:
DGMGRL> VALIDATE DATABASE VERBOSE South_Sales;
Database Role: Primary database
Ready for Switchover: Yes
Flashback Database Status:
Database Status Retention Target
South_Sales On 1440
Capacity Information:
Database Instances Threads
South_Sales 1 1
Managed by Clusterware:
South_Sales: NO
The static connect identifier allows for a connection to database "South_Sales".
Temporary Tablespace File Information:
South_Sales TEMP Files: 1
Data file Online Move in Progress:
South_Sales: No
Transport-Related Information:
Transport On: Yes
Log Files Cleared:
South_Sales Standby Redo Log Files: Cleared
Example 10-21 VALIDATE DATABASE Output in Verbose Format for a Physical Standby
The following command shows verbose output for a physical standby database:
DGMGRL> validate database verbose North_Sales
Database Role: Physical standby database
Primary Database: South_Sales
Ready for Switchover: Yes
Ready for Failover: Yes (Primary Running)
Flashback Database Status:
Database Status Retention Target
South_Sales On 1440
North_Sales On 1440
Capacity Information:
Database Instances Threads
South_Sales 1 1
North_Sales 1 1
Managed by Clusterware:
South_Sales : NO
North_Sales: NO
The static connect identifier allows for a connection to database "South_Sales".
Temporary Tablespace File Information:
South_Sales TEMP Files: 1
North_Sales TEMP Files: 1
Data file Online Move in Progress:
South_Sales: No
North_Sales: No
Standby Apply-Related Information:
Apply State: Running
Apply Lag: 0 seconds (computed 0 seconds ago)
Apply Delay: 0 minutes
Transport-Related Information:
Transport On: Yes
Gap Status: No Gap
Transport Lag: 0 seconds (computed 0 seconds ago)
Transport Status: Success
Log Files Cleared:
South_Sales Standby Redo Log Files: Cleared
North_Sales Online Redo Log Files: Cleared
North_Sales Standby Redo Log Files: Available
Current Log File Groups Configuration:
Thread # Online Redo Log Groups Standby Redo Log Groups
(South_Sales) (North_Sales)
1 4 5
Future Log File Groups Configuration:
Thread # Online Redo Log Groups Standby Redo Log Groups
(North_Sales) (South_Sales)
1 4 5
Current Configuration Log File Sizes:
Thread # Smallest Online Redo Smallest Standby Redo
Log File Size Log File Size
(South_Sales) (North_Sales)
1 25 MBytes 25 MBytes
Future Configuration Log File Sizes:
Thread # Smallest Online Redo Smallest Standby Redo
Log File Size Log File Size
(North_Sales) (South_Sales)
1 25 MBytes 25 MBytes
Apply-Related Property Settings:
Property South_Sales Value North_Sales Value
DelayMins 0 0
ApplyParallel AUTO AUTO
ApplyInstances 0 0
Transport-Related Property Settings:
Property South_Sales Value North_Sales Value
LogShipping ON ON
LogXptMode ASYNC ASYNC
Dependency <empty> <empty>
DelayMins 0 0
Binding optional optional
MaxFailure 0 0
ReopenSecs 30 30
NetTimeout 300 300
RedoCompression DISABLE DISABLE
Parameter Settings:
Parameter South_Sales Value North_Sales Value
DB_BLOCK_CHECKING true true
DB_BLOCK_CHECKSUM true true
DB_LOST_WRITE_PROTECT NONE NONE
Example 10-22 VALIDATE DATABASE STRICT Option for a Primary
The following example shows STRICT Primary output:
DDGMGRL> VALIDATE DATABASE 'North_Sales' STRICT ALL;
Database Role: Primary database
Ready for Switchover: No
Flashback Database Status:
Database Status Retention Target
North_Sales Off 1440
South_Sales On 1440
Managed by Clusterware:
North_Sales: NO
The static connect identifier allows for a connection to database "North_Sales".
Example 10-23 VALIDATE DATABASE STRICT Option for a Physical Standby
The following example shows STRICT Physical Standby
output:
DGMGRL> VALIDATE DATABASE 'North_Sales' STRICT ALL;
Database Role: Physical standby database
Primary Database: 'South_Sales'
Ready for Switchover: No
Primary and standby databases do not have the same number of temp files.
One or more pluggable databases have save state enabled.
Standby database has one or more pluggable databases that are offline.
Standby database has one or more data files that are offline.
Ready for Failover: Yes (Primary Running)
Example 10-24 VALIDATE DATABASE
Option for a Physical Standby
The following example shows Physical Standby output without
theSTRICT clause:
DGMGRL> VALIDATE DATABASE 'North_Sales' ;
Database Role: Physical standby database
Primary Database: 'South_Sales'
Ready for Switchover: Yes
Ready for Failover: Yes (Primary Running)
Flashback Database Status:
Database Status Retention Target
South_Sales Off 1440
North_Sales Off 1440
Managed by Clusterware:
North_Sales : NO
South_Sales: NO
The static connect identifier allows for a connection to database "South_Sales".
Parameter Settings:
Parameter South_Sales Value North_Sales Value
DB_BLOCK_CHECKING true true
DB_BLOCK_CHECKSUM true true
DB_LOST_WRITE_PROTECT AUTO AUTO