OracleDataGuard _ slave database read-only or read/write access

Source: Internet
Author: User
OracleDataGuard _ slave database read-only or read/write access

Oracle Data Guard _ slave database read-only or read/write access

Opening a Standby Database for Read-Only or Read/Write Access

8.2 Access the standby database in read-only or read-write mode

When a standby database is open for read-only access, users can query the standby database but cannot update it. thus, you can reduce the load on the primary database by using the standby database for reporting purposes. you can periodically open the standby database for read-only access and perform ad hoc queries to verify Redo Apply is updating the standby database correctly. (Note that for distributed queries, you must first issue theALTER database set transaction read ONLYstatement before you can issue a query on the read-only database .)

When the standby database is opened in read-only mode, you can only query the standby database but cannot update it. Then, you can generate reports on the slave database to reduce the load on the master database. You can regularly open the slave database in read-only mode and check whether the redo application is correctly updated to the slave database. For distributed queries, you must issue the alter database set transaction read only statement before the READ-only database query.

Shows a standby database open for read-only access.

Figure 8-1 Standby Database Open for Read-Only Access

Description of "Figure 8-1 Standby Database Open for Read-Only Access"

See Also:

A physical standby database can be opened temporarily in read/write mode for development, reporting, or testing purposes, and then flashed back to a point in the past to be reverted back to a physical standby database. when the database is flashed back, Data Guard automatically synchronizes the standby database with the primary database, without the need to re-create the physical standby database from a backup copy of the primary database.

The physical standby database can be temporarily opened for development, reporting, or testing in read/write mode, and then returns

See Also:

For a scenario that describes activating a physical standby database as a read/write reporting database, and then resynchronizing the database with the primary database

In the scenario described in Section 12.6, the active physical standby database is a read/write report database, and then the database is re-synchronized with the primary database.

8.2.1Assessing Whether or Not to Open a Standby Database

8.2.1 assess whether to open the standby Database

As you decide whether or not to open a physical standby database for read-only or read/write access, consider the following:

To determine whether to open the physical standby database in read-only or read/write mode, consider the following:

  • Opening the physical standby database read-only may lengthen the time it takes to recover from a failure or outage, because the database must be restarted after a failover.

    Opening the physical standby database in read-only mode can prolong the time for failed or interrupted recovery, because the database must be restarted after failover.

  • As long as the physical standby database has not been opened read-only since the last time it was started, a restart is unnecessary after failover, thus increasing system availability.

    As long as the physical standby database is not opened in read-only mode since the last time it was started, after the Failover, the restart is required, and the system availability will be increased.

  • While a standby database is open for read-only or read/write access, it does not apply redo data stored ed from the primary database, thus it is not kept transactionally consistent with the primary database.

    When the standby database is opened in read-only or read/write mode, the redo data from the primary database will not be applied, and transactions that are consistent with the primary database will not be applied.

  • When a physical standby database is open, redo data from the primary database is stored by the standby database, but the log files are not applied. at some point, you need to resume Redo Apply on the standby database, and apply the archived redo log files to resynchronize the standby database with the primary database. because of the additional time required to apply any accumulated archived redo log files, having a standby database open for read-only access can increase the time required to complete failovers or switchovers.

    When the physical standby database is opened, the redo data from the primary database is received by the standby database but not applied. It is a little hurt. You need to re-apply the redo data on the slave database, and apply archive logs to synchronize the data between the slave database and the master database. Because the application accumulates archive and redo log files at any additional time required,

    You can use a physical standby database for reporting purposes or as a clone database while also maintaining the ability to complete a failover or switchover quickly if you configure more than one standby database on the standby system.

    You can use a physical standby database for report purposes or clone a database, while maintaining a complete failover or normal failover.

    For example, based on your business requirements, you might:

    For example, based on your business needs, you can:

  • Configure two physical standby databases with one standby database always faster Ming Redo Apply to be as current as possible with the primary database and the other standby database open in read-only mode during business hours for reporting purposes.

    Configure two physical standby databases, one of which is used to redo the logs of the application master database as often as possible, and the other is read-only to open the logs to generate reports during the business period.

  • Configure a physical standby database to maintain a copy of the primary database for disaster recovery purposes and also configure a logical standby database to off-load reporting tasks that require access to the latest data from the primary database.

    Configure the physical standby database to maintain copies of the master database for disaster recovery. Configure the logical standby database to uninstall the report task, which requires access to the latest data of the master database.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.