6 Configuring Data Protection Modes and Redo Transport Services
Mục tiêu
Sau khi hoàn thành bài học này, bạn sẽ có thể làm
sau đây:
• Mô tả các phương thức bảo vệ dữ liệu
• Thay đổi các chế độ bảo vệ dữ liệu cấu hình của bạn
• Sửa đổi các dịch vụ vận tải làm lại để phục vụ nhu cầu của bạn
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.
6-5 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.