Sunteți pe pagina 1din 27

6

Configuring Data Protection Modes


and Redo Transport Services

Copyright 2006, Oracle. All rights reserved.


Objectives

After completing this lesson, you should be able to do the


following:
Describe the data protection modes
Change the data protection mode of your configuration
Modify redo transport services to serve your needs

6-2 Copyright 2006, Oracle. All rights reserved.


Data Protection Modes and
Redo Transport Modes

A data protection mode requires a specific redo


transport mode.
A redo transport mode alone does not define a data
protection mode.

6-3 Copyright 2006, Oracle. All rights reserved.


Defining the Redo Transport Mode

Use the attributes of LOG_ARCHIVE_DEST_n:


ARCH and LGWR
Specify that either the archiver process or the log writer
process is responsible for transmitting redo to the
standby destination
ARCH is the default.
SYNC and ASYNC (LGWR only)
Specify that network I/O operations are to be performed
synchronously or asynchronously when using LGWR
SYNC is the default.
AFFIRM and NOAFFIRM
Ensure that redo has been successfully written to disk on
the standby destination
NOAFFIRM is the default.
6-4 Copyright 2006, Oracle. All rights reserved.
Setting the Redo Transport Mode

Click Edit to access the


Edit Standby Database Properties
page.

6-6 Copyright 2006, Oracle. All rights reserved.


Setting the Redo Transport Mode

Select the mode from


the Log Transport Mode
list.

6-7 Copyright 2006, Oracle. All rights reserved.


Data Protection Modes

Three data protection modes:


Maximum protection
Maximum availability
Maximum performance
Help to balance data availability and system
performance

6-8 Copyright 2006, Oracle. All rights reserved.


Maximum Protection

Enables zero data loss


Redo data must be written to both the local online redo
log and the standby redo log on at least one standby
database.
Primary database shuts down if a fault prevents it from
writing its redo stream to at least one remote standby
redo log.
Configuration requirements:
Standby redo log files on at least one standby database
SYNC, LGWR, and AFFIRM attributes
for at least one standby database

6-9 Copyright 2006, Oracle. All rights reserved.


Maximum Availability

Enables zero data loss


Provides the highest possible level of data protection
without compromising the availability of the primary
database
Redo data must be written to both the local online redo
log and the standby redo log on at least one standby
database.
Primary database does not shut down if a fault prevents
it from writing its redo stream.
Configuration requirements:
Standby redo log files on at least one standby database
SYNC, LGWR, and AFFIRM attributes
for at least one standby database

6 - 10 Copyright 2006, Oracle. All rights reserved.


Maximum Performance

Default level of data protection


Provides the highest possible level of data protection
without affecting the performance of the primary
database
Transactions can commit as soon as the redo data is
written to the local online redo log.
Redo stream is written asynchronously with respect to
the commitment of the transactions that create the redo
data.

6 - 11 Copyright 2006, Oracle. All rights reserved.


Setting the Data Protection Mode

Click the Protection Mode


link.

6 - 12 Copyright 2006, Oracle. All rights reserved.


Setting the Data Protection Mode

6 - 13 Copyright 2006, Oracle. All rights reserved.


Setting the Data Protection Mode
by Using the CLI

1. Configure standby redo logs.


2. Set the LogXptMode property (if necessary).
3. Set the data protection mode.

DGMGRL> EDIT DATABASE 'site1_edrsr8p1' SET PROPERTY


'LogXptMode'='SYNC';
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS
MAXAVAILABILITY;

6 - 14 Copyright 2006, Oracle. All rights reserved.


Setting the Protection Mode
by Using SQL

You must set attributes to support the type of protection


desired.
Issue the ALTER DATABASE statement on the primary
database:

ALTER DATABASE SET STANDBY TO MAXIMIZE PROTECTION;

6 - 15 Copyright 2006, Oracle. All rights reserved.


Delaying the Application of Redo

Delaying the application of redo helps safeguard against:


Data corruption
User errors

Oracle Net

Delayed
application

Production Standby
database database

6 - 16 Copyright 2006, Oracle. All rights reserved.


Using Enterprise Manager to Delay
the Application of Redo

Specify the delay in


minutes.

6 - 17 Copyright 2006, Oracle. All rights reserved.


Setting LOG_ARCHIVE_DEST_n
to Delay the Application of Redo

Use the attributes of LOG_ARCHIVE_DEST_n to control the


application of redo:
DELAY: number of minutes to delay application of redo
(default: 30 minutes)

6 - 18 Copyright 2006, Oracle. All rights reserved.


Using Flashback Database
Instead of Apply Delay

Standby1

No delay

Primary Standby2
database
4-hour delay
Standby3

8-hour delay

Primary Standby
database

6 - 19 Copyright 2006, Oracle. All rights reserved.


Additional Attributes That Affect
Redo Transport Services

ALTERNATE
DEPENDENCY
MAX_FAILURE
NET_TIMEOUT
REOPEN

6 - 20 Copyright 2006, Oracle. All rights reserved.


Using the ALTERNATE Attribute

Can specify one alternate destination for the


LOG_ARCHIVE_DEST_n parameter
Allow a failed destination to change destinations
Disk full: switch to new disk
Oracle Net link fails: switch to new network link
Require REOPEN=0 or MAX_FAILURE
Enabled with LOG_ARCHIVE_DEST_STATE_n

log_archive_dest_3='SERVICE=stby1_path1 REOPEN=0
ALTERNATE=LOG_ARCHIVE_DEST_4'
log_archive_dest_4='SERVICE=stby1_path2 REOPEN=0
OPTIONAL'
log_archive_dest_state_3=ENABLE
log_archive_dest_state_4=ALTERNATE

6 - 21 Copyright 2006, Oracle. All rights reserved.


Using the MAX_FAILURE Attribute

MAX_FAILURE[=count]
Number of times redo transport services attempts to
reestablish communication
Requires REOPEN
No default count

log_archive_dest_3='SERVICE=o10g1 LGWR MAX_FAILURE=30


REOPEN'

6 - 22 Copyright 2006, Oracle. All rights reserved.


Using the NET_TIMEOUT Attribute

Enables the LGWR process to avoid a network timeout


issue
Valid with SYNC or ASYNC destinations
Value supplied is the number of seconds to wait.
Range of values for NET_TIMEOUT: 15 to 1200
Default: 180
Use caution in maximum protection mode.

log_archive_dest_2='SERVICE=o10g2 LGWR SYNC


NET_TIMEOUT=30'

6 - 23 Copyright 2006, Oracle. All rights reserved.


Using the REOPEN Attribute

REOPEN[=seconds]
Minimum number of seconds to wait before retrying a
failed destination at log switch
Failures can be network failures, quota exceptions, disk
full, and so on.
Default: 300 seconds (5 minutes)
REOPEN=0
Failed destinations remain disabled until:
Manually reenabled
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_n=ENABLE
issued
Instance restart
Required when using ALTERNATE destinations with
MAX_FAILURE=0 attributes

6 - 24 Copyright 2006, Oracle. All rights reserved.


Optimized Asynchronous Redo Transmission
Primary
database MRP or
transactions LSP Standby
(MRP only)
database
LGWR LNSn RFS

Oracle Net
Online
redo Backup
logs
Reports
FAL
ARC0
ARC1
ARC2

Archived redo Archived redo


logs logs

6 - 25 Copyright 2006, Oracle. All rights reserved.


Enabling Multiple Connections
for Remote Archival of Redo

The following conditions must be met to enable this


feature:
Remote archiving is performed to disk.
LOG_ARCHIVE_LOCAL_FIRST must be set to TRUE
(default).

LOG_ARCHIVE_DEST_3=
'SERVICE=detroit MAX_CONNECTIONS=5'

6 - 26 Copyright 2006, Oracle. All rights reserved.


Summary

In this lesson, you should have learned how to:


Describe the data protection modes
Change the data protection mode of your configuration
Modify redo transport services to suit your needs
Delay the application of redo
Use additional transport services attributes

6 - 27 Copyright 2006, Oracle. All rights reserved.


Practice 6: Overview

This practice covers the following topics:


Changing the data protection mode
Delaying the application of redo

6 - 28 Copyright 2006, Oracle. All rights reserved.

S-ar putea să vă placă și