D17316 gc20 l06_dataprot_logtrans
-
Upload
moeenuddin -
Category
Technology
-
view
346 -
download
0
Transcript of D17316 gc20 l06_dataprot_logtrans
6Copyright © 2006, Oracle. All rights reserved.
Configuring Data Protection Modesand Redo Transport Services
Copyright © 2006, Oracle. All rights reserved.6 - 2
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
Copyright © 2006, Oracle. All rights reserved.6 - 3
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.
Copyright © 2006, Oracle. All rights reserved.6 - 4
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.
Copyright © 2006, Oracle. All rights reserved.6 - 6
Setting the Redo Transport Mode
Click Edit to access the Edit Standby Database Properties
page.
Copyright © 2006, Oracle. All rights reserved.6 - 7
Setting the Redo Transport Mode
Select the mode from the Log Transport Mode
list.
Copyright © 2006, Oracle. All rights reserved.6 - 8
Data Protection Modes
• Three data protection modes:– Maximum protection– Maximum availability– Maximum performance
• Help to balance data availability and system performance
Copyright © 2006, Oracle. All rights reserved.6 - 9
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
Copyright © 2006, Oracle. All rights reserved.6 - 10
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
Copyright © 2006, Oracle. All rights reserved.6 - 11
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.
Copyright © 2006, Oracle. All rights reserved.6 - 12
Setting the Data Protection Mode
Click the Protection Mode link.
Copyright © 2006, Oracle. All rights reserved.6 - 13
Setting the Data Protection Mode
Copyright © 2006, Oracle. All rights reserved.6 - 14
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;
Copyright © 2006, Oracle. All rights reserved.6 - 15
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;
Copyright © 2006, Oracle. All rights reserved.6 - 16
Delaying the Application of Redo
Delaying the application of redo helps safeguard against:
• Data corruption
• User errors
Productiondatabase
Standbydatabase
Ora
cle
Net Delayed
application
Copyright © 2006, Oracle. All rights reserved.6 - 17
Using Enterprise Manager to Delay the Application of Redo
Specify the delay in minutes.
Copyright © 2006, Oracle. All rights reserved.6 - 18
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)
Copyright © 2006, Oracle. All rights reserved.6 - 19
Using Flashback Database Instead of Apply Delay
No delay
4-hour delay
Standby1
Standby2
Standby3
8-hour delay
Standby
Primary database
Primary database
Copyright © 2006, Oracle. All rights reserved.6 - 20
Additional Attributes That Affect Redo Transport Services
• ALTERNATE• DEPENDENCY• MAX_FAILURE• NET_TIMEOUT• REOPEN
Copyright © 2006, Oracle. All rights reserved.6 - 21
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=ENABLElog_archive_dest_state_4=ALTERNATE
Copyright © 2006, Oracle. All rights reserved.6 - 22
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'
Copyright © 2006, Oracle. All rights reserved.6 - 23
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'
Copyright © 2006, Oracle. All rights reserved.6 - 24
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
Copyright © 2006, Oracle. All rights reserved.6 - 25
Optimized Asynchronous Redo Transmission
LGWR
Primary database
transactions
Onlineredologs
ARC0
FAL
RFS
MRP or LSP
Archived redo logs
(MRP only)
Archived redo logs
ARC1ARC2
LNSn
Ora
cle
Net
Reports
Backup
Standbydatabase
Copyright © 2006, Oracle. All rights reserved.6 - 26
Enabling Multiple Connectionsfor Remote Archival of Redo
LOG_ARCHIVE_DEST_3='SERVICE=detroit MAX_CONNECTIONS=5'
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).
Copyright © 2006, Oracle. All rights reserved.6 - 27
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
Copyright © 2006, Oracle. All rights reserved.6 - 28
Practice 6: Overview
This practice covers the following topics:
• Changing the data protection mode
• Delaying the application of redo