SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area 281018368 bytes
Fixed Size 2020160 bytes
Variable Size 109055168 bytes
Database Buffers 163577856 bytes
Redo Buffers 6365184 bytes
Database mounted.
SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY; --修改数据保护模式
Database altered.
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=orcl OPTIONAL LGWR SYNC AFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=orcl'; --备库设置
System altered.
SQL> SELECT PROTECTION_MODE, PROTECTION_LEVEL FROM V$DATABASE;
PROTECTION_MODE PROTECTION_LEVEL
-------------------- --------------------
MAXIMUM AVAILABILITY RESYNCHRONIZATION