热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

Oracle10gDataGuard级别切换-mysql教程

环境:OS:rhel6.3_64bitDB:Oracle10gR2级别切换过程:主库SQLgt;selectprotection_mode,protection_levelfromv$

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

推荐阅读
author-avatar
愤怒的黑皮_165
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有