『ORACLE』 DG性能转换(11g)

一、最大性能转换至最大可用

确认主库模式:

SYS@enmo2 hey~2->select protection_mode,protection_level from v$database;

PROTECTION_MODE PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE

确认备库模式:

SYS@enmo1 hey~1->select name,protection_mode,database_role,switchover_status from v$database;

NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ENMO1 MAXIMUM PERFORMANCE PHYSICAL STANDBY TO PRIMARY

修改参数:alter system set LOG_ARCHIVE_DEST_2= 'SERVICE=enmo2 ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=enmo2';

Database altered.

模式转换

SYS@enmo1 hey~1->alter database set standby database to maximize availability;

Database altered.

主库确认模式:

SYS@enmo2 hey~2->select name,protection_mode,database_role,switchover_status from v$database;

NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ENMO1 MAXIMUM AVAILABILITY PHYSICAL STANDBY TO STANDBY

备库确认模式:

SYS@enmo1 hey~1->select name,protection_mode,database_role,switchover_status from v$database;

NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ENMO1 MAXIMUM AVAILABILITY PHYSICAL STANDBY NOT ALLOWED

二、最大可用切换到最大保护

SYS@enmo1 hey~1->alter database set standby database to maximize protection;

Database altered.

SYS@enmo1 hey~1->select name,protection_mode,database_role,switchover_status from v$database;

NAME PROTECTION_MODE DATABASE_ROLE SWITCHOVER_STATUS
--------- -------------------- ---------------- --------------------
ENMO1 MAXIMUM PROTECTION PHYSICAL STANDBY TO STANDBY

 

转载于:https://www.cnblogs.com/KT-melvin/p/6817841.html

你可能感兴趣的:(数据库)