Home > Database > Mysql Tutorial > Data Gurad物理备份方式下以READ ONLY/WRITE模式打开物理STANDBY

Data Gurad物理备份方式下以READ ONLY/WRITE模式打开物理STANDBY

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:24:48
Original
1008 people have browsed it

物理standby可以有效分担primary 数据库压力,提升资源利用,实际上说的就是这个。以read only 或read write 模式打开物理standb

一、READONLY/WRITE模式打开物理STANDBY

物理standby可以有效分担primary 数据库压力,提升资源利用,实际上说的就是这个。以read only 或read write 模式打开物理standby,你可以转移一些查询任何啦,

备份之类的操作到standby 数据库,以这种方式来分担一些primary 的压力。

下面我们来演示一下,如何切换standby 数据库的打开模式,其实,非常简单。例如,,以Read-only 模式打开物理standby:

这里要分两种情况:

1).standby 数据库处于shutdown 状态

直接startup 即可。

SQL> startup

Oracle 例程已经启动。

......

2).standby 数据库处于redo 应用状态。

首先取消redo 应用:

SQL> alter database recover managed standby database cancel;

数据库已更改。

然后再打开数据库

SQL> alter database open ;

数据库已更改。

提示:open 的时候不需要附加read only 子句,oracle 会根据控制文件判断是否是物理standby,从而自

动启动到read only 模式,直接startup 也是同理。

3).如果想从open 状态再切换回redo 应用状态,可以直接启用redo 应用即可,例如:

SQL> select status from v$instance;

STATUS

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

OPEN

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

数据库已更改。

SQL> select status from v$instance;

STATUS

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

MOUNTED

有时你也可能也要先shutdown再startup mount后再执行

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>

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template