Oracle Data Guard ensures high availability, data protection, and disaster recovery for enterprise data.

It provides a comprehensive suite of services that create, maintain, manage, and monitor one or more standby databases, allowing production Oracle databases to survive disasters and data corruption.
Data Guard maintains these standby databases as transactionally consistent copies of the production database. If the production database becomes unavailable due to a planned or unplanned disruption, Data Guard can switch any standby database to the production role, minimizing downtime associated with the disruption. This system can be used with traditional backup, restore, and clustering techniques to provide a high level of data protection and availability.
Additionally, with Data Guard, administrators can optionally enhance the performance of the production database by offloading resource-intensive reporting and backup operations to standby systems.
What Configures Oracle Data Guard?
- Data Protection Configurations
This consists of a production database and one or more standby databases. Databases in a Data Guard configuration are connected through Oracle Net and can be geographically dispersed.
There are no restrictions on the location of databases as long as they can communicate with each other. For instance, you could have a standby database on the same system as the production database, along with two standby databases on other systems in remote locations.
You can manage primary and standby databases using SQL command-line interfaces or Data Guard Broker interfaces, including a command-line interface (DGMGRL) and a graphical interface integrated into Oracle Enterprise Manager.
- Primary Database
A Data Guard configuration contains a production database, also called the primary database, operating in the primary role. This is the database most of your applications access.
The primary database can be a single-instance Oracle database or an Oracle Real Application Clusters (RAC) database.
- Standby Databases
A standby database is a transactionally consistent copy of the primary database. Using a backup copy of the primary database, you can create up to nine standby databases and incorporate them into a Data Guard configuration. Once created, Data Guard automatically maintains each standby database by transmitting redo data from the primary database and then applying the redo to the standby database.
Like a primary database, a standby database can be a single-instance Oracle database or an Oracle RAC database.
A standby database can be a physical standby or a logical standby database:
- Physical Standby Database
Provides a physically identical copy of the primary database, with disk database structures that are identical to the primary database block by block.
The database schema, including indexes, is the same. A physical standby database is kept synchronized with the primary database through Redo Apply, which retrieves redo data received from the primary database and applies the redo to the physical standby database.
A physical standby database can be used for limited business purposes other than disaster recovery.
- Logical Standby Database
Contains the same logical information as the production database, though the physical organization and structure of the data may differ. The logical standby database is kept synchronized with the primary database through SQL Apply, which transforms redo data received from the primary database into SQL statements and then executes those SQL statements on the standby database.
A logical standby database can be used for other business purposes besides disaster recovery. This allows users to access a logical standby database for queries and informational purposes at any time.
Additionally, when using a logical standby database, you can update Oracle Database software and patch sets with minimal downtime. Therefore, a logical standby database can be used simultaneously for data protection, reporting, and database upgrades.
How Does Oracle Data Guard Protect Data?
- Redo Transport Services
Redo transport services control the automated transfer of redo data from the production database to one or more archive destinations. These Redo services perform the following tasks:
- Transmit redo data from the primary system to the standby systems in the configuration.
- Manage the resolution of gaps in archived redo log files due to network failure.
- Enforce database protection modes.
- Automatically detect missing or corrupted archived redo log files on a standby system and retrieve replacement archived redo log files from the primary database or another standby database.
- Log Apply Services
Redo data transmitted from the primary database is written to the standby system as standby redo log files, if configured, and then archived as archived redo log files.
The log apply services automatically apply redo data to the standby database to maintain consistency with the primary database. This also allows read-only access to the data.
The main difference between physical and logical standby databases is how log apply services apply archived redo data:
For physical standby databases, Data Guard uses Redo Apply technology, which applies redo data to the standby database using standard Oracle database recovery techniques.
- Role Transitions
An Oracle database operates in one of two roles: primary or standby. With Data Guard, you can change a database's role through a switchover or failover operation.
A “switchover” is a role reversal between the primary database and one of its standby databases. A switchover ensures no data loss. This is typically done for planned maintenance of the primary system. During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role. This transition occurs without the need to re-create any of the databases.
A “failover” occurs when the primary database is unavailable. Failover is performed only in the case of a catastrophic failure of the primary database, and the failover results in a transition of a standby database to the primary role. The database administrator can configure Data Guard to ensure no data loss.