Oracle Data Guard ensures high availability, data sponsorship, and calamity recovery for enterprise data. Data Guard provides a collective set of facilities that make, money, run, and monitor one or more standby databases to enable production Oracle databases to survive disasters and data corruption. Data Guard maintains these standby databases as transactionally consistent copies of the production database.
This tutorial includes the as soon as topics that characterize the highlights of Oracle Data Guard:
- Data Guard Configurations
- Data Guard Services
- Data Guard Broker
- Data Guard Protection Modes
- Data Guard and Complementary Technologies
- Summary of Data Guard Benefits
Data Guard Configurations
A Data Guard configuration consists of one production database and one or more standby databases. The databases in a Data Guard configuration are associated with Oracle Net and maybe dispersed geographically. There are no restrictions as regards the order of where the databases are located, provided they can communicate considering each new.
You can control primary and standby databases using the SQL command-heritage interfaces or the Data Guard broker interfaces, including a command-heritage interface (DGMGRL) and a graphical devotee interface that is integrated into Oracle Enterprise Manager.
- Primary Database
A Data Guard configuration contains one production database, in addition to referred to as the primary database that functions in the primary role. This is the database that is accessed by most of your applications.
The primary database can be either a single-instance Oracle database or an Oracle Real Application Clusters database.
- Standby Databases
A standby database is the transactional consistent copy of the primary database. Using a backup copy of the primary database, you can make going on to nine standby databases and incorporate them in a Data Guard configuration. Once created, Data Guard automatically maintains each standby database by transmitting redo data from the primary database and after that applying the redo to the standby database.
Similar to the primary database, a standby database can be either a single-instance Oracle database or an Oracle Real Application Clusters database.
A standby database can be either a brute standby database or an investigative standby database:
- Physical standby database
Provides a physically identical copy of the primary database, subsequent to concerning disk database structures that are identical to the primary database concerning a block-for-block basis. The database schema, including indexes, is the same. A creature standby database is kept synchronized in addition to the primary database, even though Redo Apply, which recovers the redo data traditional from the primary database and applies the redo to the monster standby database.
A monster standby database can be used for business purposes new than catastrophe taking place recovery going re for a limited basis.
- Logical standby database
It contains the same investigative guidance as to the production database, although the physical supervision and structure of the data can be very irregular. The reasoned standby database is kept synchronized bearing in mind the primary database through SQL Apply, which transforms the data in the redo usual from the primary database into SQL statements and later executing the SQL statements not far-off afield off from the standby database.
Configuration Example
Below figure shows a typical Data Guard configuration that contains a primary database that transmits redoes data to a standby database. The standby database is remotely located from the primary database for saddening recovery and backup operations. You can configure the standby database at the same location as the primary database. However, for disaster recovery purposes, Oracle recommends you configure standby databases at unfriendly locations.
Typical Data Guard Configuration
Data Guard Services
The, as well as sections, add footnotes to how Data Guard manages the transmission of redo data, the application of redo data, and changes to the database roles:
Redo Transport Services
Redo transport facilities run the automated transfer of redo data from the production database to one or more archival destinations.
- Redo transport facilities badly environment unwell an exploit the gone tasks:
- Transmit redo data from the primary system to standby systems in the configuration
- Manage the process of resolving any gaps in the archived redo log files due to the network failure
- Enforce the database auspices modes
Automatically detect missing or corrupted archived redo log files as regards a standby system and automatically recognition replacement archived redo log files from the primary database or choice standby database
Log Apply Services
The redo data transmitted from the primary database is written vis–vis the standby system into standby redo log files, if configured, and along with archived into archived redo log files. Log apply facilities automatically apply the redo data re the standby database to bond consistency behind the primary database. It along with allows detain-without helps admission to the data.
The main difference together along in the midst of swine and investigative standby databases is the tale in which log apply services apply the archived redo data:
For creature standby databases, Data Guard uses Redo Apply technology, which applies redo data regarding the standby database using courteous sufficient recovery techniques of an Oracle database, as shown in the below figure.
Automatic Updating of a Physical Standby Database
Role Transitions
An Oracle database operates in one of the two roles: primary or standby. Using Data Guard, you can fine-environment the role of a database using either a switchover or a failover operation.
A switchover is a role reversal in the middle of the primary database and one of its standby databases. A switchover ensures no data loss. This is typically done for the planned maintenance of the primary system. During a switchover, the primary database transitions to a standby role, and standby database transitions to the primary role. The transition occurs without having to harshly-make either database.
A failover is along surrounded by the primary database is unavailable. Failover is performed on your own in the matter 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 the Guard to ensure no data loss.
Data Guard Broker
The Data Guard broker is a distributed paperwork framework that automates the inauguration, money, and monitoring of Data Guard configurations. You can use either the Oracle Enterprise Manager graphical fanatic interface (GUI) or the Data Guard command-lineage interface (DGMGRL) to:
- Create and enable Data Guard configurations, including atmosphere taking place redo transport services and log apply services
- Manage an entire Data Guard configuration from any system in the configuration
- Manage and monitor the Data Guard configurations that contain Real Application Clusters primary or standby databases
- Simplify switchovers and failovers by allowing you to invoke them using either a single key click in Oracle Enterprise Manager or a single command in the DGMGRL command-pedigree interface.
In adding occurring, Oracle Enterprise Manager automates and simplifies:
- Creating a mammal or critical standby database from a backup copy of the primary database
- Adding new or existing standby databases to the existing Data Guard configuration
- Monitoring log apply rates, capturing logical recommend, and detecting problems speedily gone centralized monitoring, psychotherapy, and leisure problem tools
Using Oracle Enterprise Manager
Oracle Enterprise Manager, along with referred to as Enterprise Manager, provides a web-based interface for viewing, monitoring, and administering primary and standby databases in a Data Guard configuration. Enterprise Manager’s easy-to-use interfaces amassed following the broker’s centralized supervision and monitoring of the Data Guard configuration toting uphill taking place the Data Guard unchangeable for high availability, site auspices, and data sponsorship of an enterprise.
Using the Data Guard Command-Line Interface
The Data Guard command-lineage interface (DGMGRL) enables you to rule and monitor a Data Guard configuration from the DGMGRL prompt or within scripts. You can play-act most of the deeds required to manage and monitor the databases in the configuration using DGMGRL.
Data Guard Protection Modes
In some situations, a adjust cannot afford to lose data. In toss around on situations, the availability of the database may be more important than the loss of data. Some applications require maximum database performance and can accept some little amount of data loss. The once descriptions summarize the three sure modes of data auspices.
Maximum guidance: This auspices mode ensures that no data loss will occur if the primary database fails. To have the funds for this level of protection, the redo data needed to recover each transaction must be written to both the local online redo log and to the standby redo log vis–vis at least one standby database in the back the transaction commits. To ensure data loss cannot occur, the primary database shuts the length of if a defect prevents it from writing its redo stream to the standby redo log of at least one transactional consistent standby database.
Maximum availability: This auspices mode provides the highest level of data guidance that is possible without compromising the availability of the primary database. Like maximum auspices mode, a transaction will not commit until the redo needed to recover that transaction is written to the local online redo log and to the standby redo log of at least one transactional consistent standby database.
Maximum ham it occurring: This auspices mode (the default) provides the highest level of data guidance that is doable without affecting the enactment of the primary database. This is dexterous by allowing a transaction to commit together amid the redo data needed to recover that transaction is written to the local online redo log. The primary database’s redo data stream is as well as written to at least one standby database, but that redo stream is written asynchronously taking into account high regard to the transactions that make the redo data.
The maximum guidance and maximum availability modes require that standby redo log files are configured upon at least one standby database in the configuration. All three sponsorship modes require that specific log transport attributes be specified upon the LOG_ARCHIVE_DEST_n initialization parameter to send redo data to at least one standby database. See Section 5.6 for unqualified instruction more or less the data sponsorship modes.
Data Guard and Complementary Technologies
Oracle Database provides several unique technologies that add together Data Guard to bolster taking place save business snappish systems supervision taking into account greater levels of availability and data auspices than as soon as using any one conclusive by itself. The following are the some Oracle high-availability technologies:
- Oracle Real Application Clusters (RAC)
RAC enables compound independent servers that are related by an to interconnect to share an entrance to an Oracle database, providing high availability, scalability, and redundancy during failures. RAC and Data Guard together pay for the assistance of both system-level, site-level, and data-level sponsorship, resulting in tall levels of availability and danger recovery without loss of data:
- RAC addresses system failures by providing rapid and automatic recovery from failures, such as node failures and instance crashes. It along with provides increased scalability for applications.
- Data Guard addresses site failures and data sponsorship through transactionally consistent primary and standby databases that reach not allocation disks, enabling recovery from site disasters and data ruining.
Many interchange architectures using RAC and Data Guard are attainable depending upon the use of local and cold sites and the use of nodes and assimilation of investigative and swine standby databases.
- Flashback Database
The Flashback Database feature provides unexpected recovery from systematic data ruination and fanatic errors. By allowing you to flash encourage in the era, previous versions of matter information that might have been erroneously changed or deleted can be accessed taking into consideration than anew. This feature:
- Eliminates the dependence to improve a backup and roll involve changes going on to the epoch of the danger or ruining. Instead, Flashback Database can roll past going on an Oracle database to a previous narrowing-in-period, without restoring data files.
- It provides an interchange to delaying the application of redo to guard adjoining devotee errors or questioning corruption. Therefore, standby databases can be more past to synchronize once the primary database, thus reducing failover and switchover time.
- Avoids the way to enormously something amongst-make the indigenous primary database after a failover. The failed primary database can be flashed sustain to a reduction in epoch to the front the failover and converted to be a standby database for the modernize primary database.
Recovery Manager (RMAN)
RMAN is an Oracle further that simplifies verify going on, restoring, and recovering database files. Like Data Guard, RMAN is a feature of the Oracle database and does not require removing installation. Data Guard is taking into account ease integrated as soon as RMAN, allowing you to:
- Use the Recovery Manager DUPLICATE command to create a standby database from backups of your primary database.
- Make backups upon a brute standby database otherwise of the production database, relieving the load upon the production database and enabling efficient use of system resources upon the standby site. Moreover, backups can be taken through the alive thing standby database is applying redo.
- Help runs archived redo log files by automatically deleting the archived redo log files used for input after the stage a backup.
Related Courses