Home  >  Article  >  Database  >  Oracle 12c R1 DataGuard物理备库启用real-time apply

Oracle 12c R1 DataGuard物理备库启用real-time apply

WBOY
WBOYOriginal
2016-06-07 17:33:011081browse

Oracle 12c R1 DataGuard物理备库启用real-time apply

Oracle 12c R1 DataGuard物理备库启用real-time apply

物理备库一直是在mount状态下,,这样的话不方便数据的同步验证

启用real-time apply就能够实现real-time query

在备库mount状态下:

SQL> select open_mode from v$database;

OPEN_MODE
------------------------------------------------------------
MOUNTED

SQL> alter database recover managed standby database cancel;

数据库已更改。

SQL> ALTER DATABASE OPEN;

数据库已更改。

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;

数据库已更改。

SQL> select open_mode from v$database;

OPEN_MODE
------------------------------------------------------------
READ ONLY WITH APPLY

在主库:

SQL> create table john(id number, name varchar2(40)); 

表已创建。

SQL> insert into john values(1, 'john');

已创建 1 行。

SQL> insert into john values(2, 'cai');

已创建 1 行。

SQL> commit;

提交完成。

备库查询:

SQL> select * from john;

 ID NAME
---------- ------------------------------------------------------------------------------------------------------------------------
  1 john
  2 cai

可见是实时同步的!

推荐阅读:

使用RMAN的Duplicate功能创建物理DataGuard

Oracle基础教程之通过RMAN复制数据库

RMAN备份策略制定参考内容

RMAN备份学习笔记

Oracle数据库备份加密 RMAN加密

通过RMAN备份duplicate创建DataGuard

linux

Statement:
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