oracle dataguard concept 11g
Terminology
Primary Database: Also called production database.
Standby Database: It is a consistent copy of the primary DB. You can have upto 9 standby DBs for a primary. A standby database can be either a physical standby database or a logical standby database.
Physical Standby: It is a physically identical copy to primary DB (in short block-on-block) on disk. Changes from primary are synched with standby using Redo-Apply method.
Logical Standby: This standby DB have the same data(logical information) as in primary but the physical structure can be different. The DB is kept current using SQL Apply method.
Switchover: During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role (in short roles are reversed). This is typically part of planned maintenance of the primary system.
Failover: Failover happens only in the event of a disaster or failure of the primary database, and the failover results in a transition of a standby database to the primary role.It can happen if the primary database server crashes or geographic disasters.
Dataguard Protection Mode/Level:
Maximum Protection: Zero loss of data. The redo of the primary have to be written to local online redo log and standby redo log before the transaction are saved. To ensure no data loss, primary DB shuts down if a fault prevents access to standby redo log.
Requirements for Maximum Protection mode:
Redo Transport mode: SYNC
Disk Write Option: AFFIRM
Standby Redo Logs: Yes
Standby Database Type: Physical and Logical (10g and above)
LOG_ARCHIVE_DEST_2=’SERVICE=standby SYNC AFFIRM NET_TIMEOUT=30 REOPEN=300 DB_UNIQUE_NAME=standby VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE)'
SERVICE – Specifies a valid service name for the standby database.
SYNC | ASYNC – Specifies whether the redo data is to be received at the destination before the transaction is committed. ASYNC is default.
AFFIRM | NOAFFIRM – Control whether the redo destination acknowledges received redo data. NOAFFIRM is the default for ASYNC if not specified. AFFIRM is the default for SYNC for if not specified.
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.
Maximum Performance: Default mode. This allows transaction on primary to be saved if redo information are written to local online redo log.The primary redo data stream also writes to standby redo log but asynchronously to the local redo log.
LOG_ARCHIVE_DEST_2=’SERVICE=standby ASYNC NOAFFIRM NET_TIMEOUT=30 REOPEN=300 DB_UNIQUE_NAME=standby VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE)’
Maximum Availability: This mode behaves as Maximum Protection mode. The redo transaction have to be written to both local online redo log and standby redo log but it doesn't shutdown primary database in case of any fault. During the at fault scenarios, it is changed to Maximum Performance mode until the fault is corrected and all the redo gaps are fixed. Once fixed, it automatically changes to Maximum Availability.
Requirements for Maximum Availability mode:
Redo Transport mode: SYNC
Disk Write Option: AFFIRM
Standby Redo Logs: Yes
Standby Database Type: Physical and Logical
Below is an example of the LOG_ARCHIVE_DEST_n parameter for a Maximum Availability configuration.
LOG_ARCHIVE_DEST_2=’SERVICE=standby SYNC AFFIRM NET_TIMEOUT=30 REOPEN=300 DB_UNIQUE_NAME=standby VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE)’
Comments
Post a Comment