Skip Headers
Oracle® Database High Availability Overview
11g Release 2 (11.2)

Part Number E10804-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

3 Oracle Database High Availability Solutions for Unplanned Downtime

Oracle Database offers an integrated suite of high availability solutions that increase availability and eliminate or minimize both planned and unplanned downtime. These solutions help enterprises maintain business continuity 24 hours a day, seven days a week. However, the Oracle high availability solutions go beyond reducing downtime by providing solutions to increase system utilization on the primary and secondary systems and to help improve overall performance, scalability, and manageability.

Oracle provides the following features for high availability for unplanned downtime:

Also, Chapter 4, "Oracle Database High Availability Solutions for Planned Downtime" provides a summary of the key high availability solutions that address different types of planned downtime along with the recovery time for each solution.

See Also:

3.1 Oracle High Availability Solutions and Recovery for Unplanned Downtime

Oracle Database provides high availability solutions to prevent and reduce downtime for all types of unplanned failures.

Table 3-1 describes the various Oracle high availability solutions for unplanned downtime. The table shows how the features discussed in Section 3.2 through Section 3.19 can be used to address various causes of unplanned downtime. Also, see Table 7-4 for a summary of the attainable recovery times for all types of unplanned downtime for each Oracle high availability architecture.

Table 3-1 Outage Types and Oracle High Availability Solutions for Unplanned Downtime

Outage Scope Oracle Solution Benefits

Site Failures

Oracle Data Guard

  • Fast-start failover and FAN with integrated Oracle clients

Site Failures

Oracle Streams

  • Online replica database resumes processing

Site Failures

Recovery Manager

Computer Failures

Oracle Real Application Clusters and Oracle Clusterware

  • Automatic recovery of failed nodes and instances

  • Fast application notification (FAN) with integrated Oracle client failover

Computer Failures

Fast-Start Fault Recovery

  • Tunable and predictable cache recovery from computer failures

Computer Failures

Oracle Data Guard

  • Fast-start failover and FAN with integrated Oracle clients

Computer Failures

Oracle Streams

  • Online replica database resumes processing.

Storage Failures

Oracle Automatic Storage Management

  • Mirroring and online automatic rebalancing places redundant copies of the data in separate failure groups.

Storage Failures

Oracle Data Guard

  • Fast-start failover and FAN with integrated Oracle clients

Storage Failures

Recovery Manager with Fast Recovery Area and Oracle Secure Backup

  • Fully managed database recovery and managed disk and tape backups

Storage Failures

Oracle Streams

  • Online replica database resumes processing.

Data Corruption

Oracle Exadata Storage Server Software (Exadata Cell) and Oracle Automatic Storage Management

  • If Oracle ASM detects a corruption and has a good mirror, Oracle ASM returns the good block and repairs the corruption during a subsequent write I/O

  • Exadata Cell is the most comprehensive solution, to prevent corruptions from being written to disk, and it is HARD compliantFoot 1 

Data Corruption

Corruption Prevention, Detection, and Repair

Database initialization settings such as DB_ULTRA_SAFE, DB_BLOCK_CHECKING, DB_BLOCK_CHECKSUM

  • Different levels of block corruption prevention and detection at the database level

Data Corruption

Data Recovery Advisor and Recovery Manager with Fast Recovery Area

  • Data Recovery Advisor automatically detects data corruptions and recommends the best recovery plan.

  • RMAN online block-media recovery time is faster because RMAN can use flashback logs to restore a more current copy of the data block for recovery.

Data Corruption

Oracle Data Guard

  • Repair primary data blocks in real time by fetching a good version from a physical standby database

  • Fast-start failover and FAN with integrated Oracle clients

Data Corruption

Oracle Streams

  • Processing resumes on the online replica database

Human Errors

Oracle Security Features

  • Restrict access as prevention

Human Errors

Oracle Flashback Technology

  • Fine-grained and database-wide rewind capability

Human Errors

LogMiner

  • Redo log analysis

Lost writes

Oracle Data Guard, Recovery Manager, and the DB_LOST_WRITE_PROTECT initialization parameter

Also, setting DB_ULTRA_SAFE to DATA_ONLY or DATA_AND_INDEX automatically enables DB_LOST_WRITE_PROTECT.

  • DB_LOST_WRITE_PROTECT initialization parameter provides lost write detection.

  • If a lost write that occurred on the primary database is detected either by the physical standby database or during media recovery of the primary database, recovery is stopped to preserve the consistency of the database. However, failing over to the standby database using Oracle Data Guard will result in some data loss.

  • If a lost write is detected on the standby database, you can restore the affected file and restart Redo Apply if the lost write is isolated and the hardware problem is corrected.

    Note: Lost writes can corrupt the entire database, which may require that you rebuild the affected database after resolving the hardware issue.

Lost writes

Oracle Data Guard

Oracle Exadata Storage Server Software (Exadata Cell)

  • Detection and prevention of stray or misdirected writes to another data file. Check with your HARD-compatible storage vendor to learn whether the vendor has implemented this additional protection. For the most comprehensive lost write protection, use Oracle Data Guard

  • HARD does not detect a lost write in the following cases:

    *If any layer of software or hardware (host driver, volume manager, host bus adapter, storage array firmware) acknowledges the write but did not issue it

    *If the write was mistakenly written to a nondatabase file (for example, the write I/O was misdirected to the swap file)

  • Exadata Cell is compliant with the HARD initiative, and implements all of the HARD checks. Unlike other implementations of HARD checking, HARD checks with Exadata Cell operate completely transparently. See Section 3.15 for details.

  • For the most comprehensive lost write protection, use Oracle Data Guard and set either the DB_ULTRA_SAFE parameter (to DATA_ONLY or DATA_AND_INDEX) or set the DB_LOST_WRITE_PROTECT parameter (to TYPICAL or FULL) on both the primary and standby databases

Hangs or slow down

Oracle Database and Oracle Enterprise Manager

  • Oracle Database automatically monitors for database hangs and attempts to resolve them.

  • Oracle Enterprise Manager or a customized application heartbeat can be configured to detect application or response time slowdown and react to these SLA breaches.

    For example, you can configure the Enterprise Manager Beacon to monitor and detect application response times. Then, after a certain threshold expires, Enterprise Manager can call the Oracle Data Guard DBMS_DG.INITIATE_FS_FAILOVER PL/SQL procedure to initiate a failover. See the section about "Application Initiated Fast-Start Failover" in Oracle Data Guard Broker.


Footnote 1 Exadata Cell is compliant with the HARD initiative. In fact, Exadata Cell implements all of the HARD checks and because of its tight integration with Oracle Database, additional checks are implemented that are specific to Exadata Cell. Unlike other implementations of HARD checking, HARD checks with Exadata Cell operate completely transparently. You do not need to set parameters at the database or storage tier. The HARD checks transparently handle all cases, including Oracle ASM disk rebalance operations and disk failures.

3.2 Fast-Start Fault Recovery

Oracle Database provides fast and predictable recovery from system faults and database failures. The Fast-Start Fault Recovery technology included in Oracle Database automatically bounds instance recovery time at startup by using self-tuned checkpoint processing. This makes recovery time fast and predictable, and improves the ability to meet service-level objectives. The Oracle Fast-Start Fault Recovery feature can reduce recovery time on a heavily laden database from tens of minutes to a few seconds.

Fast-Start Fault Recovery features include:

3.3 Oracle Restart

Oracle Restart is a new feature in Oracle 11g Release 2 (11.2) that enhances the availability of a single-instance (nonclustered) Oracle database and its components. Oracle Restart is used in single-instance environments only. For Oracle Real Application Clusters (Oracle RAC) environments, the functionality to automatically restart components is provided by Oracle Clusterware.

If you install Oracle Restart, it automatically restarts the database, the listener, and other Oracle components after a hardware or software failure or whenever the database's host computer restarts. It also ensures that the Oracle components are restarted in the proper order, in accordance with component dependencies.

Oracle Restart periodically monitors the health of components—such as SQL*Plus, the Listener Control utility (LSNRCTL), ASMCMD, and Oracle Data Guard—that are integrated with Oracle Restart. If the health check fails for a component, Oracle Restart shuts down and restarts the component.

Oracle Restart runs out of the Oracle Grid Infrastructure home, which you install separately from Oracle Database homes.

See Also:

3.4 Oracle Real Application Clusters and Oracle Clusterware

Oracle RAC and Oracle Clusterware allow Oracle Database to run any packaged or custom application across a set of clustered servers. This capability provides the highest levels of availability and the most flexible scalability. If a clustered server fails, then Oracle Database continues running on the surviving servers. When more processing power is needed, you can add another server without interrupting access to data.

Oracle RAC enables multiple instances that are linked by an interconnect to share access to an Oracle database. In an Oracle RAC environment, Oracle Database runs on two or more systems in a cluster while concurrently accessing a single shared database. The result is a single database system that spans multiple hardware systems, enabling Oracle RAC to provide high availability and redundancy during failures in the cluster. Oracle RAC accommodates all system types, from read-only data warehouse systems to update-intensive online transaction processing (OLTP) systems.

Oracle Clusterware is software that, when installed on servers running the same operating system, enables the servers to be bound together to operate as if they are one server, and manages the availability of user applications and Oracle databases. Oracle Clusterware also provides all of the features required for cluster management, including node membership, group services, global resource management, and high availability functions:

Oracle Clusterware is a requirement for using Oracle RAC. Oracle Clusterware is the only clusterware that you need for most platforms on which Oracle RAC operates. Although Oracle Database continues to support third-party clusterware products on specified platforms, using Oracle Clusterware provides these main benefits:

In addition, Oracle Database features, such as Oracle Service, use the underlying Oracle Clusterware mechanisms to provide their capabilities.

Oracle Clusterware requires two clusterware components: a voting disk to record node membership information and the Oracle Cluster Registry (OCR) to record cluster configuration information. The voting disk and the OCR must reside on shared storage. Oracle Clusterware requires that each node be connected to a private network over a private interconnect.

3.4.1 Benefits of Using Oracle Clusterware

Oracle Clusterware provides the following benefits:

  • Tolerates and quickly recovers from computer and instance failures.

  • Simplifies management and support by means of using Oracle Clusterware together with Oracle Database. By using fewer vendors and an all Oracle stack you gain better integration compared to using third-party clusterware.

  • Performs rolling upgrades for system and hardware changes. For example, you can apply Oracle Clusterware upgrades, patch sets, and interim patches in a rolling fashion, as follows:

    • Upgrade Oracle Clusterware from Oracle Database 10g to Oracle Database 11g

    • Upgrade Oracle Clusterware from Oracle Database release 11.1 to release 11.2

    • Patch Oracle Clusterware from Oracle Database 11.1.0.6 to 11.1.0.7

    • Patch Oracle Clusterware from Oracle Database 10.2.0.2 Bundle 1 to Oracle Database 10.2.0.2 Bundle 2

  • Automatically restarts failed Oracle processes.

  • Automatically manages the virtual IP (VIP) address so when a node fails then the node's VIP address fails over to another node on which the VIP address can accept connections.

  • Automatically restarts resources from failed nodes on surviving nodes.

  • Controls Oracle processes as follows:

    • For Oracle RAC databases, Oracle Clusterware controls all Oracle processes by default.

    • For Oracle single-instance databases, Oracle Clusterware allows you to configure the Oracle processes into a resource group that is under the control of Oracle Clusterware.

  • Provides an application programming interface (API) for Oracle and non-Oracle applications that enables you to control other Oracle processes with Oracle Clusterware, such as restart or react to failures and certain rules.

  • Manages node membership and prevents split-brain syndrome in which two or more instances attempt to control the database.

  • Provides the ability to perform rolling release upgrades of Oracle Clusterware, with no downtime for applications.

3.4.2 Benefits of Using Oracle Real Application Clusters and Oracle Clusterware

Together, Oracle RAC and Oracle Clusterware provide all of the Oracle Clusterware benefits listed in Section 3.4.1 plus the following benefits:

  • Provides better integration and support of Oracle Database by using an all Oracle software stack compared to using third-party clusterware.

  • Relocate Oracle Service automatically. Plus, when you perform additional fast application notification (FAN) and client configuration, distribute FAN events so that applications can react immediately to achieve fast, automatic, and intelligent connection and failover.

  • Detect connection failures fast and automatically, and remove terminated connections for any Java application using Oracle Universal Connection Pool (UCP) Fast Connection Failover and FAN events.

  • Balance work requests using Oracle UCP runtime connection load balancing.

  • Use runtime connection load balancing with Oracle UCP, Oracle Call Interface (OCI), and Oracle Data Provider for .NET (ODP.NET).

  • Distribute work across all available instances using load balancing advisory.

  • Allow the flexibility to increase processing capacity using commodity hardware without downtime or changes to the application.

  • Provide comprehensive manageability integrating database and cluster features.

  • Provide scalability across database instances.

  • Implement Fast Connection Failover for nonpooled connections.

3.5 Oracle Data Guard

Oracle Data Guard ensures high availability, data protection, and disaster recovery for enterprise data. Oracle Data Guard provides a comprehensive set of services that create, maintain, manage, and monitor one or more standby databases to enable Oracle databases to survive disasters and data corruptions. Oracle Data Guard maintains standby databases as transactionally consistent copies of the primary (production) database. Then, if the primary database becomes unavailable because of a planned or an unplanned outage, Oracle Data Guard can switch any standby database to the primary role, minimizing the downtime associated with the outage. Oracle Data Guard can be used with traditional backup, restoration, and cluster techniques to provide a high level of data protection and data availability.With Oracle Data Guard, administrators can optionally improve primary database performance by off-loading resource-intensive backup and reporting operations to standby systems.

A Oracle Data Guard configuration consists of one primary database and one or more standby databases. Using a backup copy of the primary database, you can create up to 30 standby databases and incorporate them in a Oracle Data Guard configuration. After the database is created, Oracle Data Guard automatically maintains each standby database by transmitting redo data from the primary database and then applying the redo data to the standby database.

3.5.1 Types of Standby Databases

Similar to a primary database, a standby database can be either a single-instance Oracle database or an Oracle RAC database.

A standby database can be a physical standby database, a snapshot standby database, or a logical standby database, and a Oracle Data Guard configuration can include any combination of these types of standby databases: physical standby database, snapshot standby database, and logical standby database.

Physical Standby Database

A physical standby database provides a physically identical copy of the primary database, with data files that are identical to the primary database. The database schemas, including indexes, are the same. A physical standby database is kept synchronized with the primary database, through Redo Apply, which recovers the redo data received from the primary database and applies the redo data to the physical standby database.

You can use a physical standby database for business purposes other than disaster recovery. The physical standby database can be:

  • Open a physical standby database for read-only access while redo data is being applied to the standby database. This mode is referred to as the Active Data Guard optionFoot 1 , and allows users access to an up-to-date physical standby database.

  • Use a physical standby database to offload the overhead of performing backups from the primary database. This is possible because a physical standby is an exact copy of the primary database.

Also, you can convert a physical standby database to:

  • Logical standby database

Snapshot Standby Database

A snapshot standby database is a physical standby database that is temporarily converted into an updatable standby database. A snapshot standby database receives and archives redo data from the primary database—protecting data on the primary database at all times—but the snapshot standby database does not apply redo data from the primary database while the standby is open for read/write access. Thus, the snapshot standby typically diverges from the primary database over time. Moreover, local updates to the snapshot standby database cause additional divergence.

Redo data from the primary database is not applied until you convert the snapshot standby database back into a physical standby database. With a single command, you can revert a snapshot standby to a physical standby database, at which time the changes made to the snapshot standby state are discarded, and Redo Apply automatically resynchronizes the physical standby database with the primary database using the redo data that was archived.

Logical Standby Database

A logical standby database contains the same logical information as the primary database, although the physical organization and structure of the data can be different. The logical standby database is kept synchronized with the primary database through SQL Apply, which transforms the redo data received from the primary database into SQL statements and then executes the SQL statements on the standby database.

A key benefit of a logical standby database is that you can create significant auxiliary structures to optimize the reporting workload, including structures that could have a prohibitive effect on the transactional response time of the primary database. A logical standby database:

  • Can have its data physically reorganized into a different storage type with different partitioning having many different indexes, and having on-demand refresh materialized views created and maintained. See Oracle Database Concepts for an overview of materialized views.

  • Can be used to drive the creation of data cubes and other OLAP data views. See Oracle OLAP Java API Developer's Guide for more information.

  • Can be used for other business purposes in addition to satisfying disaster recovery requirements, allowing users to access a logical standby database for queries and reporting purposes at any time.

  • Can be used to upgrade Oracle Database software and patch sets with almost no downtime.

Thus, you can use a logical standby database concurrently for data protection, reporting, and database upgrades.

3.5.2 Benefits of Using Oracle Data Guard and Standby Databases

Oracle Data Guard provides the following overall benefits:

  • Maintenance of real-time, transactionally consistent database copies to provide protection against unplanned downtime and disaster.

  • Data protection against and fast repair of computer failures, human errors, data corruption, lost writes, and site failures.

  • Automatic failover with flexible data protection levels to support all network configurations and business requirements.

  • Faster redo application, redo transport, and role transitions with various enhancements.

  • Reduction of planned downtime for system changes, some platform migrations, hardware and system upgrades, and Oracle patch set and database upgrades (see also Table 4-2).

  • Multiple levels of data protection and performance to balance data availability against system performance requirements.

  • Support for both physical standby databases (including the Active Data Guard option) and logical standby databases to provide more efficient use of system resources by diverting more querying and reporting functions from the primary database to standby databases (with the logical standby databases providing greater flexibility for any activity that requires access to a standby database that is open for read/write access). See also the "Benefits of Physical Standby Databases" and "Benefits of Logical Standby Databases".

  • Support for the snapshot standby database for reporting or testing (cloning) purposes and automatic resynchronization with the primary database after reporting or testing has completed. See also "Benefits of Snapshot Standby Databases".

  • Support for automatic application notification so that application connections are seamless and fail over transparently.

  • Automatic or automated resynchronization of a failed primary database following a failover.

  • Management of all systems as a single configuration for simplified administration.

  • Increased flexibility for Oracle Data Guard configurations where the primary and standby systems may have different CPU architectures, operating systems (for example, Windows and Linux), operating system binaries (32-bit and 64-bit), and Oracle database binaries (32-bit and 64-bit); this is subject to restrictions that are defined in support note 413484.1 at http://metalink.oracle.com/.

Benefits of Physical Standby Databases

  • Guarantees a physical, block-for-block copy of the primary database

  • Can be open for read-only queries while Redo Apply is active for real-time reporting (requires the Active Data Guard option that is described in Section 5.4.1)

  • At role transition, offers assurance that the standby database is an exact replica of the old primary database

  • Can be used to offload backups from primary database

  • Provides very high performance, completely transparent to workload profile

  • Has no data type restrictions

  • Can be useful for minimizing downtime for many planned maintenance events

Benefits of Snapshot Standby Databases

  • Inherits all the attributes of a physical standby database

  • Can be open for read/write I/O and can process transactions independent of the primary database

  • Protects the primary database the entire time it is open for read-write I/O

  • Allows you to issue a single command to convert a Snapshot Standby back to a synchronized physical standby database

  • Provides an ideal test system, especially when combined with Oracle Real Application Testing

Benefits of Logical Standby Databases

  • Provides a logical, transaction-for-transaction copy of the primary database

  • Allows creation of additional objects, modification of objects

  • Provides the ability to skip apply on certain objects

  • Supports real-time reporting

  • Is open for read/write I/O (the data in tables that is maintained by SQL Apply cannot be changed)

  • Minimizes downtime for software upgrades (see Oracle Data Guard Concepts and Administration for information about using SQL Apply to perform a rolling upgrade of Oracle Database software.)

3.6 Oracle Streams

Oracle Streams is a very flexible and powerful database feature that is used to implement fine-grained replication, multimaster replication, many-to-one replication, data transformation, hub-and-spoke replication, and message queuing.

Comparing Oracle Streams and Oracle Data Guard

Oracle Streams is designed for information sharing and it is the only technology that enables a globally distributed, update anywhere architecture. Oracle Streams enables highly customized replication strategies to satisfy the many varied uses of data replicated to a destination database. These same capabilities also make Oracle Streams a useful technology for addressing high availability and disaster recovery requirements and for minimizing planned downtime during upgrades to new database releases and patch sets.

Oracle Data Guard is designed for simple, one-way replication of an entire database expressly for maintaining a synchronized copy that can assume the primary role in a failure. Redo Apply (physical standby database) best exemplifies this notion of simplicity, as a disaster recovery solution that is both data type and application agnostic, and able to scale to very high levels of performance.

Although Oracle Data Guard also provides capabilities that enable a standby database to off-load from the primary database the overhead of performing backups, queries, and reports, these capabilities are ancillary to the primary mission of Oracle Data Guard, and are provided to increase your return on investment in high availability and disaster recovery.

To get additional value from a Oracle Data Guard configuration, you can use SQL Apply (logical standby database) to minimize planned downtime during upgrades to new database releases and patch sets.

Oracle Streams Messaging and Information Flow

Oracle Streams enables information sharing. In Oracle Streams, each unit of shared information is called a message, and you can share these messages in a stream. The stream can propagate information within a database or from one database to another.

For example, Figure 3-1 shows a Oracle Streams multimaster configuration where all sites are directly connected to all other sites participating in the replication environment. The multimaster configuration enables data to be replicated between all locations at a rate that is nearly matches the real-time rate of replication.

Figure 3-1 Oracle Streams Multimaster Configuration

Description of Figure 3-1 follows
Description of "Figure 3-1 Oracle Streams Multimaster Configuration"

Another example is the Oracle Streams 1-N, or hub-and-spoke configuration, in which changes made at the primary (hub) location are propagated to the remote (spoke) locations in a near real-time manner.

Although it is possible to configure a hub-and-spoke configuration for bidirectional replication, you may prefer to restrict updates to a single location—the hub—as shown in Figure 3-2. In query-intensive environments, you can still balance the load between multiple locations, with fast local access, whereas updates are restricted to the hub. By off-loading reporting to the spoke locations, you improve performance at the hub, or primary OLTP location. This type of configuration is easier to implement than multimaster replication because it is not necessary to establish connectivity between all locations in the replication environment and it is not necessary to implement a conflict resolution strategy.

Figure 3-2 Information Dissemination with Oracle Streams (1-N Configuration)

Description of Figure 3-2 follows
Description of "Figure 3-2 Information Dissemination with Oracle Streams (1-N Configuration)"

The stream routes specific information to specific destinations. The result is a feature that provides greater functionality and flexibility than traditional solutions for capturing and managing messages and sharing the messages with other databases and applications. Oracle Streams provides the capabilities needed to build and operate distributed enterprises and applications, data warehouses, and high availability solutions. You can use all of the capabilities of Oracle Streams at the same time. If your business requirements change, then you can implement a new capability of Oracle Streams without sacrificing existing capabilities.

Every Oracle Streams configuration has three phases: capture, stage (propagate), and consume (apply). Using Oracle Streams, you control what information is put into a stream, how the stream flows or is routed from database to database, what happens to messages in the stream as they flow into each database, and how the stream terminates. By configuring specific capabilities of Oracle Streams, you can address specific requirements. Based on your specifications, Oracle Streams can capture, stage, and manage messages in the database automatically, including, but not limited to, data manipulation language (DML) changes and data definition language (DDL) changes. You can also put user-defined messages into a stream, and Oracle Streams can propagate the information to other databases or applications automatically. When messages reach a destination, Oracle Streams can consume them based on your specifications.

Figure 3-3 shows the Oracle Streams information flow.

Figure 3-3 Oracle Streams Information Flow

Description of Figure 3-3 follows
Description of "Figure 3-3 Oracle Streams Information Flow"

With Oracle Streams, you can create a local or remote copy of a production database. If a human error or catastrophe occurs, you can use the copy to resume processing. You can use Oracle Streams to configure flexible high availability environments.

You can use the features of Oracle Streams to achieve little or no database downtime during database upgrade and maintenance operations. Maintenance operations include migrating a database to a different platform, migrating a database to a different character set, modifying database schema objects to support upgrades to user-created applications, and applying an Oracle software patch.

Figure 3-4 shows an application that explicitly enqueues and dequeues messages through Oracle Streams Advanced Queuing as a method of sharing information with business partners or customers with different messaging systems. After it is enqueued, messages can be transformed and propagated as desired, before being dequeued to a business partner's application that is a nondatabase-oriented messaging system.

Figure 3-4 Oracle Streams Message Queuing

Description of Figure 3-4 follows
Description of "Figure 3-4 Oracle Streams Message Queuing"

Benefits of Using Oracle Streams

Oracle Streams provides the following benefits:

See Also:

3.7 Oracle Flashback Technology

Flashback technology provides a set of features to switch between views of the data as it existed at different points in time. Using flashback features, you can query past versions of schema objects and historical data. You can also perform change analysis and self-service repair to recover from logical corruption while the database is online.

Flashback technology provides a SQL interface to quickly analyze and repair human errors. Flashback technology provides fine-grained analysis and repair for localized damage such as deleting the wrong customer order. Flashback technology also enables correction of more widespread damage, yet does it quickly to avoid long downtime. Flashback technology is unique to Oracle Database and supports recovery at all levels including row, transaction, table, tablespace, and database.

Most of the flashback features use undo data, whereas other features (such as Flashback Database and Block Media Recovery) use flashback logs:

The following sections describes the Flashback features:

3.7.1 Oracle Flashback Query

Oracle Flashback Query provides the ability to view the data as it existed in the past by using the Automatic Undo Management system to obtain metadata and historical data for transactions. Undo data is persistent and survives a database malfunction or shutdown. The unique features of Flashback Query not only provide the ability to query previous versions of tables, they also provide a powerful mechanism to recover from erroneous operations.

Uses of Flashback Query include:

  • Recovering lost data or undoing incorrect, committed changes. For example, rows that have been deleted or updated can be immediately repaired even after they have been committed.

  • Comparing current data with the corresponding data at some time in the past. For example, using a daily report that shows the changes in data from yesterday, it is possible to compare individual rows of table data, or find intersections or unions of sets of rows.

  • Checking the state of transactional data at a particular time, such as verifying the account balance on a certain day.

  • Simplifying application design by removing the need to store certain types of temporal data. Using a Flashback Query, it is possible to retrieve past data directly from the database.

  • Applying packaged applications, such as report generation tools, to past data.

  • Providing self-service error correction for an application, enabling users to undo and correct their errors.

3.7.2 Oracle Flashback Version Query

Oracle Flashback Version Query is an extension to SQL that you can use to retrieve the versions of rows in a given table that existed in a specific time interval. Oracle Flashback Version Query returns a row for each version of the row that existed in the specified time interval. For any given table, a new row version is created each time the COMMIT statement is executed.

Oracle Flashback Version Query is a powerful tool that database administrators (DBA) can use to run analysis to determine the source of problems. Additionally, application developers can use Oracle Flashback Version Query to build customized applications for auditing purposes.

3.7.3 Oracle Flashback Transaction

Oracle Flashback Transaction backs out a transaction and its dependent transactions. The DBMS_FLASHBACK.TRANSACTION_BACKOUT() procedure rolls back a transaction and its dependent transactions while the database remains online. This recovery operation uses undo data to create and execute the compensating transactions that return the affected data to its original state. You can query the DBA_FLASHBACK_TRANSACTION_STATE view to see whether the transaction has been backed out using dependency rules or forced out by either:

  • Backing out nonconflicting rows

  • Applying undo SQL

Oracle Flashback Transaction increases availability during logical recovery by quickly backing out a specific transaction or set of transactions and their dependent transactions. You use one command to back out transactions while the database remains online.

3.7.4 Oracle Flashback Transaction Query

Oracle Flashback Transaction Query provides a mechanism to view all changes made to the database at the transaction level. When used in conjunction with Oracle Flashback Version Query, it offers a fast and efficient means to recover from a human or application error. Oracle Flashback Transaction Query increases the ability to perform online diagnosis of problems in the database by returning the database user that changed the row, and performs analysis and audits on transactions.

3.7.5 Oracle Flashback Table

Oracle Flashback Table recovers a table to a previous point in time. It provides a fast, online solution for recovering a table or set of tables that has been modified by a human or application error. In most cases, Oracle Flashback Table alleviates the need for administrators to perform more complicated point-in-time recovery operations. The data in the original table is not lost when you use Oracle Flashback Table because you can return the table to its original state.

3.7.6 Oracle Flashback Drop

Oracle Flashback Drop

Dropping objects by accident is a problem for database users and database administrators alike. Although there is no easy way to recover dropped tables, indexes, constraints, or triggers, Oracle Flashback Drop provides a safety net when you are dropping objects. When you drop a table, it is automatically placed into the Recycle Bin. The Recycle Bin is a virtual container where all dropped objects reside. You can continue to query data in a dropped table.

3.7.7 Oracle Flashback Restore Points

When an Oracle Flashback recovery operation is performed on the database, the DBA must determine the point in time—identified by the system change number (SCN) or timestamp—to which you can later flash back the data. Oracle Flashback restore points are labels that you can define to substitute for the SCN or transaction time used in Flashback Database, Flashback Table, and Recovery Manager (RMAN) operations. Furthermore, a database can be flashed back through a previous database recovery and open resetlogs by using guaranteed restore points. Guaranteed restore points allow major database changes—such as database batch jobs, upgrade, or patch—to be quickly undone by ensuring that the undo required to rewind the database is retained.

Using the Oracle Flashback restore points feature provides the following benefits:

  • Provides the ability to quickly restore to a consistent state, to a time before a planned operation that has gone awry (for example, a failed batch job, an Oracle software upgrade, or an application upgrade)

  • Allows the snapshot standby to be resynchronized with the production database

  • Serves as a quick mechanism to restore a test or cloned database to its original state

3.7.8 Oracle Flashback Database

Oracle Flashback Database provides a more efficient alternative to database point-in-time recovery. With Oracle Flashback Database, you can revert current data files to their contents at a past time. The result is much like restoring data from data file backups and executing point-in-time database recovery. However, Flashback Database skips the data file restoration and most of the application of redo data.

Enabling Oracle Flashback Database provides the following benefits:

3.7.9 Block Media Recovery Using Flashback Logs

After attempting automatic block repair, block media recovery can optionally retrieve a more recent copy of a data block from the flashback logs to reduce recovery time. Automatic block repair allows corrupt blocks on the primary database to be automatically repaired as soon as they are detected, by using good blocks from a physical standby database.

Furthermore, a corrupted block encountered during instance recovery does not result in instance recovery failure. The block is automatically marked as corrupt and added to the RMAN corruption list in the V$DATABASE_BLOCK_CORRUPTION table. You can subsequently issue the RMAN RECOVER BLOCK command to fix the associated block. In addition, the RMAN RECOVER BLOCK command restores blocks from a physical standby database, if it is available.

3.7.10 Flashback Data Archive

The Flashback data archive is stored in a tablespace and contains transactional changes to every record in a table for the duration of the record's lifetime. The archived data can be retained for a much longer duration than the retention period offered by an undo tablespace.

3.8 Oracle Automatic Storage Management

Oracle ASM provides a vertically integrated file system and volume manager directly in the Oracle Database kernel, resulting in:

For optimal performance, Oracle ASM spreads files across all available storage. To protect against data loss, Oracle ASM extends the concept of SAME (stripe and mirror everything) and adds more flexibility as it can mirror at the database file level rather than the entire disk level.

More importantly, Oracle ASM simplifies the processes of setting up mirroring, adding disks, and removing disks. Instead of managing hundreds and possibly thousands of files (as in a large data warehouse), DBAs using Oracle ASM create and administer a larger-grained object called a disk group. The disk group identifies the set of disks that are managed as a logical unit. Automation of file naming and placement of the underlying database files save administrators time and ensure adherence to standard best practices.

The Oracle ASM native mirroring mechanism (two-way or three-way) protects against storage failures. With Oracle ASM mirroring, you can provide an additional level of data protection with the use of failure groups. A failure group is a set of disks sharing a common resource (disk controller or an entire disk array) whose failure can be tolerated. After it is defined, an Oracle ASM failure group intelligently places redundant copies of the data in separate failure groups. This ensures that the data is available and transparently protected against the failure of any component in the storage subsystem.

Oracle ASM provides the following benefits:

3.9 Fast Recovery Area

The fast recovery area, previously referred to as a flash recovery area, is a unified storage location for all recovery-related files and activities in Oracle Database. After this feature is enabled, all RMAN backups, archived redo log files, control file autobackups, flashback logs, and data file copies are automatically written to a specified file system or Oracle ASM disk group, and the management of this disk space is handled by RMAN and the database server.

Performing a backup to disk is faster because using the fast recovery area eliminates the bottleneck of writing to tape. More importantly, if database media recovery is required, then data file backups are readily available. Restoration and recovery time is reduced because you do not need to find a tape and a free tape device to restore the needed data files and archived redo log files.

The fast recovery area provides the following benefits:

3.10 Recovery Manager

RMAN is an Oracle utility to manage database backup and, more importantly, the recovery of the database. RMAN eliminates operational complexity while providing superior performance and availability of the database.

RMAN determines the most efficient method of executing the requested backup, restoration, or recovery operation and then submits these operations to the Oracle Database server for processing. RMAN and the server automatically identify modifications to the structure of the database and dynamically adjust the required operation to adapt to the changes.

RMAN provides the following benefits:

3.11 Data Recovery Advisor

Data Recovery Advisor automatically diagnoses persistent (on-disk) data failures, presents appropriate repair options, and runs repair operations at your request.

You can use Data Recovery Advisor to troubleshoot:

Data Recovery Advisor includes the following functionality:

See Also:

"Diagnosing and Repairing Failures with the Data Recovery Advisor" in Oracle Database Backup and Recovery User's Guide

3.12 Oracle Secure Backup

Oracle Secure Backup is a centralized tape backup management solution providing heterogeneous data protection in distributed UNIX, Linux, Windows, and Network Attached Storage (NAS) Environments. By protecting file system and Oracle Database data, Oracle Secure Backup provides a complete tape backup solution for your IT environment.

Oracle Secure Backup is tightly integrated with RMAN to provide the media management layer for RMAN, supporting releases since Oracle9i. With optimized integration points, Oracle Secure Backup and RMAN provide the fastest and most efficient tape backup capability for Oracle Database.

You can back up distributed servers to local and remote tape devices from a central Oracle Secure Backup administrative server using backup policies, calendar-based scheduling for lights out operations, or on-demand backup for immediate requirements. With its highly scalable client/server architecture, Oracle Secure Backup provides local and remote data protection, using Secure Sockets layer (SSL) for secure intradomain communication and two-way server authentication.

Oracle Secure Backup provides the following benefits:

3.13 Oracle Security Features

The best protection against human errors is to prevent their occurrence. The best way to prevent human errors is to restrict user access to only those data and services truly needed to perform business functions. Oracle Database provides a wide range of security tools to control access to application data by authenticating database users and then enabling administrators to grant them only those privileges required to perform their duties.

In addition, the Oracle Database security model provides the ability to restrict data access at a row level using Virtual Private Database, thereby further isolating database users from data that they do not need to access.

Oracle Database provides the following security benefits:

3.14 LogMiner

Oracle log files contain useful information about the activities and history of Oracle Database. Log files contain all data necessary to perform database recovery, and also record all changes made to the data and metadata in the database.

LogMiner is a fully relational tool that allows redo log files to be read, analyzed, and interpreted using SQL. Using LogMiner, you can analyze log files to:

LogMiner features include:

3.15 Oracle Exadata Storage Server Software (Exadata Cell)

Oracle Storage Grid using Exadata. Oracle Exadata Storage Server Software is a storage product that is highly optimized for use with Oracle Database. Oracle Exadata Storage Server Software, also referred to as Exadata Cell, is used to store and access Oracle Database. It runs the Exadata Cell software. It can be used in addition to traditional storage arrays and products. Exadata Cell provides database-aware storage services, such as the ability to offload database processing from the database server, while remaining transparent to SQL processing and database applications.

The Oracle Storage Grid is implemented using either Oracle ASM and Oracle Exadata Storage Server Software or Oracle ASM and third-party storage. The Oracle Storage Grid with Exadata provides seamless support for MAA-related technology, improves performance, provides unlimited I/O scalability, is straightforward to use and manage, and delivers mission-critical availability and reliability to your enterprise. Also, Exadata Cell is the most comprehensive solution, to prevent corruptions from being written to disk, and it is HARD compliant. Also, Exadata Cell with the DB_ULTRA_SAFE=DATA_AND_INDEX initialization parameter provides the most comprehensive solution to prevent corruptions from being written to disk, and Exadata Cell is HARD complaint. For HARD compliance, you will require a minimum setting of DB_BLOCK_CHECKSUM=TYPICAL.

Note:

Exadata Cell is compliant with the Hardware Assisted Resilient Data (HARD) initiative. In fact, Exadata Cell implements all of the HARD checks and because of its tight integration with Oracle Database, additional checks are implemented that are specific to Exadata Cell. Unlike other implementations of HARD checking, HARD checks with Exadata Cell operate completely transparently. You do not need to set parameters at the database or storage tier. The HARD checks transparently handle all cases, including Oracle ASM disk rebalance operations and disk failures.

See Also:

3.16 Oracle Database File System (DBFS)

Oracle Database File System (DBFS) creates a standard file system interface on top of files and directories that are stored in database tables. Oracle DBFS is similar to the Network File System (NFS) protocol in that it provides a shared network file system that looks like a local file system.

Similar to NFS, there is a server component and a client component. The server is Oracle Database and files are stored as SecureFile LOBs in a database table. Because the files are stored in the database you inherit the high availability and disaster-recovery protection Oracle Database offers, providing a full stack disaster-recovery solution. The implementation of the file system in the database is called the DBFS Content Store and allows each database user to create one or more file systems that can be mounted by clients. Each file system has its own dedicated tables that hold the file system content. A set of PL/SQL procedures implement file system access (such as CREATE, OPEN, READ, WRITE, and LIST DIRECTORY) to the database.

Oracle DBFS provides the following benefits:

See Also:

Oracle Database SecureFiles and Large Objects Developer's Guide for more information about Oracle DBFS

3.17 Client Failover

A highly available architecture must achieve fast database and client failover:

Client failover encompasses failure notification, previous connection cleanup, automatic reconnection, and possible query replay. Until Oracle Database 10g Release 2 (10.2), automatic, fast, and transparent client failover (at the session level) has been difficult to achieve for all client types and for all failures.Client failover provides the capability to integrate automatic database failover with failover procedures at the middle tier to automatically redirect clients and applications to the new primary database at the standby location within seconds of failover, providing an end-to-end solution for achieving business continuity.

See Also:

The MAA white paper "Client Failover in Data Guard Configurations for Highly Available Oracle Databases Updated" at http://www.otn.oracle.com/goto/maa

3.18 Automatic Block Repair

Automatic block repair allows corrupt data blocks to be automatically repaired as soon as the corruption is detected. This feature reduces the amount of time that data is inaccessible due to block corruption. This reduces block recovery time by using up-to-date good blocks in real-time, as opposed to retrieving blocks from disk or tape backups, or from Flashback logs.

Table 3-2 Automatic Detection and Repair of Corrupt Data Blocks

IF ... THEN ...

A corrupt data block is discovered on a primary database

A physical standby database operating in real-time query mode can be used to repair corrupt data blocks in a primary database. If possible, any corrupt data block encountered when a primary database is accessed is automatically replaced with an uncorrupted copy of that block from a physical standby database operating in real-time query mode. An ORA-1578 error is returned when automatic repair is not possible.

A corrupt data block is discovered on a physical standby database

The server attempts to automatically repair the corruption by obtaining a copy of the block from the primary database if the following database initialization parameters are configured on the standby database:

  • Configure the LOG_ARCHIVE_CONFIG parameter with a DG_CONFIG list

  • Configure a LOG_ARCHIVE_DEST_n parameter for the primary database


You can also manually repair a corrupted data block by using the RMAN RECOVER BLOCK command. This command searches several locations for an uncorrupted copy of the data block. By default, one of the locations is any available physical standby database that is operating in real-time query mode. You can use the EXCLUDE STANDBY option of the RMAN RECOVER BLOCK command to exclude physical standby databases as a source for replacement blocks.

See Also:

3.19 Corruption Prevention, Detection, and Repair

Starting in Oracle Database 11g Release 2 (11.2), the primary database automatically attempts to repair the corrupted block in real time by fetching a good version of the same block from a physical standby database.

Also, Exadata Cell is the most comprehensive solution to prevent corruptions from being written to disk, and it is Hardware Assisted Resilient Data (HARD) compliant. HARD uses block checking where the storage subsystem validates the Oracle block contents, and it can detect corruption early and prevent corrupted data from being written to disk. See Section 3.15 for more information about Exadata Cell and HARD.

Before Oracle Database 11g, block corruptions detected by RMAN were recorded in V$DATABASE_BLOCK_CORRUPTION. Beginning with Oracle Database 11g, several database components and utilities in addition to RMAN can detect a corrupt block and record it in that view. Oracle Database automatically updates this view when block corruptions are detected or repaired (for example, using block media recovery or data file recovery). Block corruptions are now discovered sooner.

You must use the DB_ULTRA_SAFE initialization parameter to automatically configure the appropriate data protection block checking level in the database. The performance impact may vary depending on the application and available system resources, but the effect can vary from 1% to 10%.

The DB_ULTRA_SAFE initialization parameter:

By making it possible to detect data corruptions in a timely manner, these features provide critical high availability benefits for Oracle Database.

See Also:

Oracle Database Reference for more information about these views and initialization parameters


Footnote Legend

Footnote 1: Oracle Active Data Guard requires a license for the Active Data Guard option. The "real-time query" feature of Active Data Guard enables a physical standby database to be open read-only while Redo Apply is active.