Enable physical STANDBY in READONLY/WRITE mode in the physical backup mode of mongourad

Source: Internet
Author: User
Physical standby can effectively share the pressure on the primary database and improve resource utilization. This is actually what we are talking about. Open physical standb in readonly or readwrite Mode

Physical standby can effectively share the pressure on the primary database and improve resource utilization. This is actually what we are talking about. Enable physical standb in read only or read write mode

1. Open physical STANDBY in READONLY/WRITE mode

Physical standby can effectively share the pressure on the primary database and improve resource utilization. This is actually what we are talking about. Enable the physical standby in read only or read write mode. You can transfer some queries,

Backup and other operations to the standby database, in this way to share some of the primary pressure.

Next we will demonstrate how to switch the standby database open mode. In fact, it is very simple. For example, open the physical standby in Read-only mode:

There are two situations:

1) The standby database is in the shutdown state.

Start up directly.

SQL> startup

The Oracle routine has been started.

......

2) The standby database is in the redo application state.

First, cancel the redo application:

SQL> alter database recover managed standby database cancel;

The database has been changed.

Then open the database.

SQL> alter database open;

The database has been changed.

Tip: you do not need to add the read only clause to open the database. oracle checks whether the read only clause is physical standby based on the control file.

The same is true for the direct startup mode.

3) If you want to switch from the open state to the redo application state, you can enable the redo application directly. For example:

SQL> select status from v $ instance;

STATUS

------------

OPEN

SQL> alter database recover managed standby database disconnect from session;

The database has been changed.

SQL> select status from v $ instance;

STATUS

------------

MOUNTED

Sometimes you may also need to shutdown and start up the mount before executing

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.

Total System Global Area 6442450944 bytes

Fixed Size 2030368 bytes

Variable Size 1090520288 bytes

Database Buffers 5335154688 bytes

Redo Buffers 14745600 bytes

Database mounted.

SQL> alter database recover managed standby database disconnect from session;

Database altered.

SQL>

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.