Oracle 10g DataGuard 级别切换

WBOY
发布: 2016-06-07 17:33:12
原创
999 人浏览过

环境: OS: rhel 6.3_64bit DB: Oracle 10gR2 级别切换过程: 主库 SQLgt; select protection_mode,protection_level from v$

环境:

OS: rhel 6.3_64bit

DB: Oracle 10gR2 

级别切换过程:

主库

SQL>  select protection_mode,protection_level from v$database;

PROTECTION_MODE      PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE
SQL> show parameter  log_archive_dest_2

NAME                                TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                  string      SERVICE=stdy LGWR ASYNC VALI
                                                D_FOR=(ONLINE_LOGFILES,PRIMARY
                                                _ROLE) DB_UNIQUE_NAME=stdy
SQL>  alter system set log_archive_dest_2='SERVICE=stdy OPTIONAL LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stdy';

System altered.
:maximize 后可跟{PROTECTION | AVAILABILITY | PERFORMANCE},分别对应最大保护,,最高可用性及最高性能。
Minimum Requirements for Maximum Protection Mode
Redo Archival Process    LGWR
Network Transmission Mode    SYNC
Disk Write Option    AFFIRM
Standby Redo Logs?    Yes
Standby Database Type    Physical Only
 
alter system set log_archive_dest_2='SERVICE=stdy OPTIONAL LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stdy';
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area  213909504 bytes
Fixed Size                  2095152 bytes
Variable Size              88082384 bytes
Database Buffers          117440512 bytes
Redo Buffers                6291456 bytes
Database mounted.
SQL>  alter database set standby database to maximize Protection;

Database altered.
sys@ORA> select protection_mode,protection_level from v$database;

PROTECTION_MODE      PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM PROTECTION  UNPROTECTED
SQL> alter database open;

Database altered.

SQL>  select protection_mode,protection_level from v$database;

PROTECTION_MODE      PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM PROTECTION  MAXIMUM PROTECTION


Minimum Requirements for Maximum Availability Mode
Redo Archival Process    LGWR
Network Transmission Mode    SYNC
Disk Write Option    AFFIRM
Standby Redo Logs?    Required for physical standby databases only. Standby redo logs are not supported for logical standby databases.
Standby Database Type    Physical or Logical

alter system set log_archive_dest_2='SERVICE=stdy OPTIONAL LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stdy';
 alter database set standby database to maximize Availability;

Minimum Requirements for Maximum Performance Mode
Redo Archival Process    LGWR or ARCH
Network Transmission Mode    ASYNC when using LGWR process. Not applicable when using the ARCH process.
Disk Write Option    NOAFFIRM
Standby Redo Logs?    Required for physical standby databases using the LGWR process.
Standby Database Type    Physical or Logical


alter system set log_archive_dest_2='SERVICE=stdy OPTIONAL LGWR ASYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stdy';
 alter database set standby database to maximize Performance;
 
SQL>  alter database set standby database to maximize availability;

Database altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area  213909504 bytes
Fixed Size                  2095152 bytes
Variable Size              88082384 bytes
Database Buffers          117440512 bytes
Redo Buffers                6291456 bytes
Database mounted.
Database opened.
SQL>  select protection_mode,protection_level from v$database;

PROTECTION_MODE      PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY

备库
停掉备库后,主库的状态会变成待同步的状态

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.

SQL>  select protection_mode,protection_level from v$database;

PROTECTION_MODE      PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM AVAILABILITY RESYNCHRONIZATION

推荐阅读:

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

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

RMAN备份策略制定参考内容

RMAN备份学习笔记

Oracle数据库备份加密 RMAN加密

通过RMAN备份duplicate创建DataGuard

linux

相关标签:
o
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板