Dataguard切换保护模式(从MAXIMUM PERFORMANCE 到 maximize availability)

1. 首先查看主库当前保护模式(主库操作)
SQL> select protection_mode,protection_level from v$database;
PROTECTION_MODE      PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM PERFORMANCE  MAXIMUM PERFORMANCE
2. 修改主库初始化参数(主库操作)
SQL> alter system set log_archive_dest_2='SERVICE=phystandby OPTIONAL LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=phystandby'  ;
System altered.
具体参数修改,参照如下表格
Maximum Availability     Maximum Performance     Maximum Protection
AFFIRM
NOAFFIRM
AFFIRM
SYNC
ASYNC
SYNC
DB_UNIQUE_NAME
DB_UNIQUE_NAME
DB_UNIQUE_NAME
3.重启主库到mount
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area  422670336 bytes
Fixed Size                  1336960 bytes
Variable Size             348129664 bytes
Database Buffers           67108864 bytes
Redo Buffers                6094848 bytes
Database mounted.
4. 在主库修改保护模式为maximize availability,并打开数据库
SQL> alter database set standby database to maximize availability;
Database altered.
SQL> alter database open;
Database altered.
5. 校验主库保护模式
SQL> select protection_mode,protection_level from v$database;
PROTECTION_MODE      PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
6. 查看备库保护模式
SQL> select protection_mode,protection_level from v$database;
PROTECTION_MODE      PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
7. 修改备库保护模式(为数据库角色切换做铺垫)
SQL> alter system set log_archive_dest_2='service=phyprimary OPTIONAL LGWR SYNC AFFIRM valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=phyprimary';
System altered.

 

参考至:http://blog.sina.com.cn/s/blog_6a5aa0300102uzeb.html

如有错误,欢迎指正

邮箱:[email protected]

你可能感兴趣的:(performance)