Today we learn what Protection Mode Data Guard are and how to Change them.
Data Guard protection modes are briefly described in the table below.
Maximum Protection Mod :
If changing to Maximum Protection or changing from Maximum Performance to Maximum Availability, the primary database is closed and reopened in mount mode.
1 2 3 4 5 | SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=orclstby SYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCLSTBY'; SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP MOUNT; SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION; SQL> ALTER DATABASE OPEN; |
Data Guard is checked. Protection mode changed to MAXIMUM PROTECTION.
1 2 3 4 | SQL> select name,database_role,open_mode,protection_mode from v$database; NAME |DATABASE_ROLE |OPEN_MODE |PROTECTION_MODE ---------|----------------|--------------------|-------------------- ORCL |PHYSICAL STANDBY|MOUNTED |MAXIMUM PROTECTION |
Maximum Availability Mod:
1 2 3 4 5 6 | SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY; SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=orclstby LGWR SYNC NET_TIMEOUT=90 REOPEN=15 VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCLSTBY'; SQL> select name,database_role,open_mode,protection_mode from v$database; --> DataGuard NAME |DATABASE_ROLE |OPEN_MODE |PROTECTION_MODE ---------|----------------|--------------------|-------------------- ORCL |PHYSICAL STANDBY|MOUNTED |MAXIMUM AVAILABILITY |
Maximum Performance Mod :
1 2 3 4 5 6 | SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=orclstby ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=ORCLSTBY'; SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE; SQL> select name,database_role,open_mode,protection_mode from v$database; --> DataGuard NAME |DATABASE_ROLE |OPEN_MODE |PROTECTION_MODE ---------|----------------|--------------------|-------------------- ORCL |PHYSICAL STANDBY|MOUNTED |MAXIMUM PERFORMANCE |