1. 主库增加 4个 Standbylog文件:

alter database add standby logfile '/u01/oradata/prod/std_redo01.log' size 50m;

2. 备库关闭MRP

recover managed standby database cancel;

3. 备库增加 4个 Standbylog文件:

alter database add standby logfile '/u01/oradata/prodstd/std_redo01.log' size 50m;

4. 俩库都备份spfile文件: create pfile from spfile;

5. 主库更改最大保护模式:

alter system set log_archive_dest_2=' SERVICE=shanghai sync affirm VALID_FOR(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=shanghai';

6.备库更改最大保护模式:

alter system set log_archive_dest_2=' SERVICE=beijing sync affirm VALID_FOR (ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=beijing';

7. 先关主库;再关备库;先起备库,后起主库,都到mount状态

8. 主库执行最大保护命令(备库不需要操作),alter database set standby database to maximize protection;

9.先打开备库,后打开主库,备库执行如下命令(当前日志及时恢复数据)

recover managed standby database using current logfile disconnect from session;

10. 检查,验证等:select name,open_mode,database_role,protection_mode,switchover_status from v$database;

11. 最大性能转换最大保护完成