| Lesson 7 || Read-only database |
| Objective || Start up a read-only database. |
Automated Standby Database
A feature of the automated standby database
is the ability to use a standby database as a read-only database. In the past, a standby database could not be opened or used
without subsequently re-cloning the production database. Thus, resources allocated to a standby database were idle and could not be used for anything other than backing up the production database.
Within Oracle, the standby database can be taken out of the recovery mode and opened for read-only query processing. This can be used to temporarily offload queries, and for reporting, even while archive logs are being copied from the primary database site. When the query processing is complete, the standby database can return to standby mode without re-cloning the production database. Other backup copies of a database can also be opened in read-only mode and used for querying.
This provides more productive resource usage while maintaining high database availability.
Guard against user errors without a total shutdown
The read-only mode allows users to query an open database, thereby eliminating the potential for online data modifications. If you maintain your standby database primarily for disaster prevention, you should not rely too heavily on it
as a source of information. If a disaster occurs, you will be forced to activate the database quickly, ceasing all user activity. If you need both disaster prevention and a standby available for queries,
you can maintain multiple standby databases, some read-only and some within managed recovery mode. Although you will need to resynchronize the read-only database, the recovery mode databases give you protection against disaster.
To open the standby database in read-only mode when the database is shut down:
- Startup the database and mount it in standby mode
- Open the database in read-only mode
If any changes are made to the primary database, such as adding or altering tablespaces, data files, redo log files, or control files, these changes must be manually transferred to the standby database.
The next lesson is the module wrap-up.
Automated Standby Database
Oracle provides a reliable and supported mechanism for implementing a standby database system to facilitate quick disaster recovery. This mechanism is called Automated Standby Database. Up to four standby systems can be maintained in a
constant state of media recovery through the automatic shipping and application of log files archived at the primary site. In the event of a primary system failure, one of the standby systems can be activated, providing immediate system availability.
Oracle provides commands and internal verifications for operations involved in the creation and maintenance of the standby systems, improving the reliability of the disaster recovery scheme.
A standby database uses the archived log information from the primary database, so it is ready to perform recovery and go online at any time. When the primary database archives its redo logs, the logs must be transferred to the remote site and applied to the standby database. The standby database is therefore always one or two logs behind the primary database in time and transaction history.
Automated Standby Database protects your data from extended outages such as power failures, or from physical disasters such as fire, floods, or earthquakes. Because the standby database is designed for disaster recovery, it ideally resides in a separate physical location from the primary database. You can open the standby database read only. This allows you to use the database for reporting. When you open a standby database read only, redo logs are placed in a queue and are not applied. As soon as the database is returned to standby mode, the queued logs and newly arriving logs are applied.
automated standby database:
A standby database is a database replica created from a backup of a primary database.