Manual | Automatic Archiving   «Prev  Next»
Lesson 7Standby databases
ObjectiveDiscuss standby databases

Standby Oracle Databases and Mission Critical Systems

There is a growing need to provide maximum availability of mission critical systems. Oracle provides several alternatives to help maintain high availability. One alternative is the use of standby databases. A standby database is a backup copy of your production database. It is maintained on an identically configured but different machine. The names of the disk drives, directory paths, and files should ideally be the same. As your production system runs, copies of the archive log files are saved to the secondary system and applied to the standby database at regular intervals. This means that the standby database is always a little behind the primary system because there is redo log information that isn't on the secondary system.
In the event of a failure, the secondary system can be activated and the standby database opened for use by your user community. The secondary system becomes your primary system and the standby database becomes your production database. Once the original primary system has been fixed, it can be used as the new secondary system maintaining your standby database.
While the standby database does not contain the most current data, it does maintain high availability with a minimal lose of data.

"Standby database" evolution from Oracle 8 to Oracle 11g

The function of standby databases has evolved significantly from Oracle 8 to Oracle 11g, with several enhancements that improved performance, manageability, and disaster recovery capabilities. Here are some key changes:
  • Basic Standby Database Features (Oracle 8)
    • Physical Standby: Oracle 8 introduced the concept of physical standby databases, which are synchronized with the primary database by applying redo logs. These redo logs were transferred from the primary database to the standby database and applied manually or through scripts.
    • Manual Management: The configuration and management of standby databases required significant manual intervention. The process of applying archived redo logs to the standby database had to be closely monitored and managed.
  • Enhancements in Oracle 11g

    Oracle 11g brought substantial improvements to standby databases, particularly with the introduction of Oracle Data Guard.

    • Data Guard Architecture: Oracle 11g introduced Oracle Data Guard, a comprehensive framework for managing standby databases. It provided a more automated and integrated solution for data protection and disaster recovery.
    • Types of Standby Databases:
      • Physical Standby: Physical standby databases in Oracle 11g still operate similarly to Oracle 8 but benefit from better automation and management features. Redo logs are automatically applied to keep the standby in sync with the primary.
      • Logical Standby: Oracle 11g supports logical standby databases, which allow data to be transformed and queried while the standby is kept in sync with the primary. Logical standby databases use SQL statements to apply changes.
    • Automatic Log Shipping: Oracle 11g automates the process of log shipping from the primary to the standby database using Data Guard, reducing the need for manual intervention.
    • Real-Time Apply: A significant improvement in Oracle 11g is the Real-Time Apply feature, which allows redo data to be applied to the standby database as it is received, rather than waiting for the logs to be archived. This reduces the lag between the primary and standby databases and provides faster switchover and failover times.
    • Fast-Start Failover: Oracle 11g introduced Fast-Start Failover, enabling automatic failover to a standby database if the primary database fails. This improves recovery time and ensures higher availability.
    • Role Transitions (Switchover and Failover): Oracle 11g provides enhanced support for role transitions between primary and standby databases, making the processes of switchover and failover more seamless and reliable.
    • Active Data Guard: Oracle 11g introduced Active Data Guard, which allows the physical standby database to be open for read-only queries while redo is being applied. This feature enables better utilization of standby resources for reporting and querying without compromising data protection.
  • Automation: Oracle 11g automates many processes that were manual in Oracle 8, such as log shipping and redo application.
  • Real-Time Data Protection: The Real-Time Apply feature in Oracle 11g significantly reduces data loss potential and improves synchronization between primary and standby databases.
  • Active Data Guard: This feature in Oracle 11g allows standby databases to be used for read operations, improving resource utilization.
  • Data Guard Management: Oracle 11g provides a robust Data Guard framework for easier and more efficient management of standby databases.

Summary of Changes
Overall, Oracle 11g transformed standby databases into a more robust and manageable solution compared to the more basic and manual standby features in Oracle 8.

Oracle 11g enables high Availability

Oracle 11g provides several technologies and features that enable high availability. These technologies help minimize planned and unplanned downtime, provide redundancy, and ensure data consistency across systems. Some of the key high availability features in Oracle 11g include:
  1. Real Application Clusters (RAC): RAC allows multiple instances of the Oracle database to run on different servers within a cluster. This provides high availability, fault tolerance, and load balancing. If one server fails, the workload is redistributed to the remaining servers in the cluster without any downtime.
  2. Data Guard: Data Guard is a disaster recovery and data replication solution that maintains a standby database as a copy of the primary database. In case of primary database failure, the standby database can be quickly activated to take over the role of the primary database, ensuring minimal downtime and data loss.
  3. Automatic Storage Management (ASM): ASM is a storage management solution that simplifies and automates the management of database storage. It provides features like disk mirroring, striping, and rebalancing to ensure high availability, performance, and fault tolerance.
  4. Flashback Technologies: Flashback technologies enable administrators to recover from human errors or logical corruptions by quickly restoring the database to a previous point in time. Some of the Flashback features include Flashback Query, Flashback Table, Flashback Drop, and Flashback Database.
  5. Fast Recovery Area (FRA): FRA is a centralized location for storing recovery-related files like archived redo logs, flashback logs, and control files. By managing these files in one place, FRA simplifies backup and recovery operations and helps ensure high availability.
  6. Online Reorganization and Redefinition: Oracle 11g allows administrators to perform various maintenance tasks, such as reorganizing tables and rebuilding indexes, without taking the database offline. This helps reduce planned downtime.
  7. Recovery Manager (RMAN): RMAN is a backup and recovery utility that automates and simplifies the process of creating, managing, and restoring database backups. It helps ensure data integrity and high availability by providing efficient and consistent backup and recovery operations.
  8. Transparent Application Failover (TAF): TAF is a feature of Oracle's connection management that enables automatic failover of client connections to a surviving instance in case of instance failure, ensuring high availability and minimizing application downtime.

Creating and maintaining standby databases

You can create a standby database by following these steps:
  1. Backup the data files
  2. Create the standby control file
  3. Archive the current redo log files
  4. Copy the standby control file, data files, and archived redo logs to the standby system
  5. Bring the standby database up in nomount mode
  6. Mount the database as a standby database
  7. Apply the archived log files
Note: More information on standby databases is contained in the Oracle8 release documentation set.
The next lesson is the module wrap-up.

SEMrush Software