Oracle standby databases — protection against physical and logical errors
An Oracle standby database provides effective protection against hardware faults in production environments and also makes it possible to recover quickly from logical, that is data, errors. Standby databases can be used to build geographically distributed disaster recovery environments.
Overview
Oracle Data Guard provides a highly available environment for business-critical databases and protects against data loss. Data Guard manages the entire lifecycle of every standby database, from creation through operation to monitoring. It guarantees data availability in disaster scenarios and offers effective protection against faulty and corrupted data.
The standby database is created as a copy of the production database and kept current by transferring the redo log files. If the production database becomes unavailable, whether for maintenance or because of a disaster, the standby database takes over its role, which keeps the resulting downtime to a minimum. Combined with Oracle's established backup, restore and cluster techniques, Data Guard delivers a high degree of failure protection and data safety.
Operating models
A standby database is a transactionally consistent copy of the production database. Up to 30 standby databases can be created from backup copies and managed in parallel. Once created, Oracle supplies them with the necessary redo information automatically. The following types are distinguished:
- Physical standby database
- Provides a physical, block-for-block identical copy of the primary database. All database schemas are identical to those of the original. The standby is synchronised through redo apply from the primary database, continuously recovering the redo files it receives. Since Oracle Database 11g Release 1 a physical standby database can be open while it receives and applies redo, although access is read-only. Beyond failure protection, the standby can therefore also serve reporting purposes.
- Logical standby database
- A logical standby database holds the same logical information as the production database, while its physical structure — tablespaces, data files and so on — may differ. It is kept in sync with the primary not through changed blocks but through SQL apply: the redo information in the logs is translated into SQL statements which are then applied to the standby. A logical standby can therefore serve purposes beyond disaster recovery.
- Snapshot standby database
- A snapshot standby database is fully updatable. Like the physical and logical variants it receives the redo information from the production database, but that information is only applied once the database is converted back into a physical standby, at which point all local changes made to the snapshot are discarded.