Dataguard : EDIT CONFIGURATION (Change Protection Mode)

Posted By Sagar Patil

Following post will give you an idea on Dataguard data protection mode in which you want configuration to run when configuration is enabled. The possible protection modes are:

MAXPROTECTION
MAXAVAILABILITY
MAXPERFORMANCE

Usage Notes :
Before you use EDIT CONFIGURATION command to set the protection mode to either MAXPROTECTION or MAXAVAILABILITY mode, ensure that standby redo log files are configured on a standby database.

* The following table shows the configuration protection modes and the minimum corresponding settings for log transport services:

The following table shows the configuration protection modes and the minimum corresponding
settings for log transport services:
Protection Mode Log Transport Mode Standby Redo Log Files Needed?
MAXPROTECTION SYNC Yes
MAXAVAILABILITY SYNC Yes
MAXPERFORMANCE ARCH or ASYNC Yes for ASYNC

The default protection mode for the configuration is MAXPERFORMANCE.

DGMGRL> show configuration
Configuration – sample
Protection Mode: MaxPerformance
Databases:
primary   – Primary database
secondary – Physical standby database

Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

To move the database from MAXPERFORMANCE to MAXPROTECTION or MAXAVAILABILITY we need to configure Log transport mode as SYNC

DGMGRL> EDIT DATABASE ‘primary’ SET PROPERTY ‘LogXptMode’=’SYNC’;
Property “LogXptMode” updated

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS  MAXPROTECTION;
Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode
Failed.

DGMGRL> EDIT DATABASE ‘secondary’ SET PROPERTY ‘LogXptMode’=’SYNC’;
Error: ORA-16789: standby redo logs not configured
Failed.

Let’s add Standby Redo Logs at Secondary database

sys@ SECONDARY> select * from v$standby_log;
no rows selected

sys@ SECONDARY> ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE 50M
*
ERROR at line 1:
ORA-01156: recovery or flashback in progress may need access to files

sys@ SECONDARY> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE cancel;
Database altered.

sys@ SECONDARY> ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE 50M;
Database altered.

sys@ SECONDARY> ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 SIZE 50M;
Database altered.

sys@ SECONDARY> ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 SIZE 50M;
Database altered.

sys@ SECONDARY> select * from v$standby_log;
GROUP# DBID                                        THREAD#  SEQUENCE#      BYTES  BLOCKSIZE       USED ARC STATUS     FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# N
EXT_TIME LAST_CHANGE# LAST_TIME
———- —————————————- ———- ———- ——
4 UNASSIGNED                                        0          0   5242
8800        512        512 YES UNASSIGNED             0                      0
0
5 UNASSIGNED                                        0          0   5242
8800        512        512 YES UNASSIGNED             0                      0
0
6 UNASSIGNED                                        0          0   5242
8800        512        512 YES UNASSIGNED             0                      0
0
3 rows selected.

sys@ SECONDARY> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT from session;
Database altered.

sys@ SECONDARY> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     145
Next log sequence to archive   0
Current log sequence           147

DGMGRL> EDIT DATABASE ‘secondary’ SET PROPERTY ‘LogXptMode’=’SYNC’;
Property “LogXptMode” updated

DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS  MAXPROTECTION;

Operation requires shutdown of instance “primary” on database “primary”
Shutting down instance “primary”…
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance “primary” on database “primary”
Starting instance “primary”…

DGMGRL> show configuration;
Configuration – sample
Protection Mode: MaxProtection
Databases:
primary   – Primary database
secondary – Physical standby database

Warning: ORA-16826: apply service state is inconsistent with the DelayMins property How to resolve ORA-16826 error?
Fast-Start Failover: DISABLED
Configuration Status:
WARNING

Leave a Reply

You must be logged in to post a comment.

Top of Page

Top menu