Wednesday, 13 January 2016

Dataguard - Changing protection modes

Dataguard - Changing protection modes:

LOG_ARCHIVE_DEST_n - It controls different aspects of how redo transport services transfer redo data from primary database destination to a standby.

This parameter has several attributes that are needed to setup your Dataguard environment, I will only mention the critical ones:

ASYNC -This is the default, the redo data generated by a transaction need not have been received at a destination which has this attribute before that transaction can commit.
or
SYNC -The redo data generated by a transaction must have been received by every enabled destination that has this attribute before that transaction can commit.

AFFIRM and NOAFFIRM - Control whether a redo transport destination acknowledges received redo data before or after writing it to the standby redo log. The default is NOAFFIRM.

DB_UNIQUE_NAME - Specifies a unique name for the database at this destination. You must specify a name; there is no default value.

VALID_FOR -Identifies when redo transport services can transmit redo data to destinations based on the following factors:

redo_log_type -whether online redo log files, standby redo log files, or both are currently being archived on the database at this destination.

database_role -whether the database is currently running in the primary or the standby role.

FAL_SERVER -Specifies the FAL (fetch archive log) server for a standby database. The value is an Oracle Net service name.

FAL_CLIENT -Specifies the FAL (fetch archive log) client name that is used by the FAL service, configured through the FAL_SERVER initialization parameter, to refer to the FAL client.
The value is an Oracle Net service name, which is assumed to be configured properly on the FAL server system to point to the FAL client (standby database).

LOG_ARCHIVE_CONFIG - Enables or disables the sending of redo logs to remote destinations and the receipt of remote redo logs.
This parameter has several attributes, the most important for this exercise is below:

DG_CONFIG - Specifies a list of up to 30 unique database names (defined with the DB_UNIQUE_NAME initialization parameter) for all of the databases in the Data Guard configuration.

NET_TIMEOUT - Specifies the time in seconds that the primary database log writer will wait for a response from the log network service (LNS) before terminating the connection and marking the standby (destination) as failed. The default value is 30 Seconds.

REOPEN - Specifies the time in seconds that the log writer should wait before attempting to access a previously failed standby (destination). The default is 300 Seconds.


Dataguard Protection Modes:

Maximum Protection
Maximum Availability
Maximum Performance

Maximum Protection:

Maximum protection is designed for zero data loss, while the redo transport is synchronous. Synchronous transport means that you're applying the database transactions at the same time on the primary and secondary database servers. The primary waits for a response telling it that the transactions has been applied to the standby database before it commits the transaction.

Maximum Availability: 

Maximum availability also has the goal of zero data loss (again, with the redo transport being synchronous). The difference is that if the standby fails or if there is a connectivity issue, it will allow the primary to continue and the standby to fall slightly behind. It is not a critical to have more than one standby for this mode of the fault tolerance.

Maximum Performance:

Maximum performance has the possibility of minimal data loss, but performance is the concern on the primary because the redo transport is done asynchronously, and it doesn't have to check back with the primary before the primary does a commit. So, if transport is a concern for slowing down the primary database and the performance risk is higher than any data loss, the maximum performance mode will allow for that.



Syntax for changing protection modes:

alter database set standby database to maximize availability;

Checking protection mode:

select status,instance_name,database_role,protection_mode from v$database,v$instance;




No comments:

Post a Comment