>  기사  >  데이터 베이스  >  Oracle 10g DataGuard 级别切换

Oracle 10g DataGuard 级别切换

WBOY
WBOY원래의
2016-06-07 17:33:12999검색

环境: 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

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.