Active Data Guard

Oracle 11gR2 - Active Data Guard.
Active Data Guard allows a standby database to be opened for read-only access while redo is still being applied. However, this benefit is offset to a certain extent by the fact that Active Data Guard is available on Enterprise Edition only and is cost option which must be licensed on both the primary and standby database.

1. How to determine whether a standby database is using Active Data Guard, use the following query:
SQL> SELECT database_role, open_mode FROM v$database;

For example:
SQL> SELECT database_role, open_mode FROM v$database;

DATABASE_ROLE     OPEN_MODE
----------------                  --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY

2. How to start the ADG.
### If you start a database in SQL*Plus using the STARTUP command and then invoke managed recovery, the Active Data Guard will be enabled.


For example:
$ sqlplus / as sysdba
SQL> STARTUP

ORACLE instance started.
Total System Global Area 6497189888 bytes
Fixed Size 2238672 bytes
Variable Size 3372222256 bytes
Database Buffers 3103784960 bytes
Redo Buffers 18944000 bytes
Database mounted
Database opened

SQL> SELECT database_role, open_mode FROM v$database;

DATABASE_ROLE    OPEN_MODE
----------------         --------------------
PHYSICAL STANDBY  READ ONLY

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
USING CURRENT LOGFILE WITH SESSION SHUTDOWN;

SQL> SELECT database_role, open_mode FROM v$database;

DATABASE_ROLE    OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY

 

### In the database has been started in SQL*Plus using STARTUP MOUNT and the database is subsequently opened read only, then invoking managed recovery will enable Active Data Guard.

For example:

$ sqlplus / as sysdba

SQL> STARTUP MOUNT

ORACLE instance started.

Total System Global Area 6497189888 bytes

Fixed Size 2238672 bytes

Variable Size 3372222256 bytes

Database Buffers 3103784960 bytes

Redo Buffers 18944000 bytes

Database mounted

Database opened

 

SQL> SELECT database_role, open_mode FROM v$database;

 

DATABASE_ROLE    OPEN_MODE

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

PHYSICAL STANDBY  MOUNTED

 

SQL> ALTER DATABASE OPEN READ ONLY;

 

SQL> SELECT database_role, open_mode FROM v$database;

 

DATABASE_ROLE    OPEN_MODE

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

PHYSICAL STANDBY READ ONLY

 

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE

USING CURRENT LOGFILE WITH SESSION SHUTDOWN;

 

SQL> SELECT database_role, open_mode FROM v$database;

 

DATABASE_ROLE    OPEN_MODE

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

PHYSICAL STANDBY  READ ONLY WITH APPLY

 

###Of course not all databases are started using SQL*Plus.

If you start the database using SRVCTL then the default open mode can be specified in the OCR.

If the database is started using SRVCTL then the database will be opened in read-only mode. For example:

$ srvctl start database -d ORCL

 

The default start mode can be modified in the OCR using the SRVCTL MODIFY DATABASE command.

For example:

$ srvctl modify database -d ORCL-s mount

 

You can also specify the start mode as a parameter to the SRVCTL START DATABASE command

For example:

$ srvctl start database -d ORCL -o open

$ srvctl start database -d ORCL -o mount

Take care when performing a switchover or switchback that the OCR is updated as part of the procedure.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/628922/viewspace-707057/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/628922/viewspace-707057/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值