Oracle® Database Administrator's Guide 11g Release 2 (11.2) Part Number E10595-04 |
|
|
View PDF |
Sometimes archive destinations can fail, causing problems when you operate in automatic archiving mode. Oracle Database provides procedures to help you minimize the problems associated with destination failure. These procedures are discussed in the sections that follow:
The optional initialization parameter LOG_ARCHIVE_MIN_SUCCEED_DEST=
n
determines the minimum number of destinations to which the database must successfully archive a redo log group before it can reuse online log files. The default value is 1. Valid values for n are 1 to 2 if you are using duplexing, or 1 to 31 if you are multiplexing.
The LOG_ARCHIVE_DEST_
n
parameter lets you specify whether a destination is OPTIONAL
(the default) or MANDATORY
. The LOG_ARCHIVE_MIN_SUCCEED_DEST=
n
parameter uses all MANDATORY
destinations plus some number of non-standby OPTIONAL
destinations to determine whether LGWR can overwrite the online log. The following rules apply:
Omitting the MANDATORY
attribute for a destination is the same as specifying OPTIONAL
.
You must have at least one local destination, which you can declare OPTIONAL
or MANDATORY
.
The MANDATORY
attribute can only be specified for destinations LOG_ARCHIVE_DEST_1
through LOG_ARCHIVE_DEST_10
.
When you specify a value for LOG_ARCHIVE_MIN_SUCCEED_DEST=
n
, Oracle Database will treat at least one local destination as MANDATORY
, because the minimum value for LOG_ARCHIVE_MIN_SUCCEED_DEST
is 1.
The LOG_ARCHIVE_MIN_SUCCEED_DEST
value cannot be greater than the number of destinations, nor can it be greater than the number of MANDATORY
destinations plus the number of OPTIONAL
local destinations.
If you DEFER
a MANDATORY
destination, and the database overwrites the online log without transferring the archived log to the standby site, then you must transfer the log to the standby manually.
If you are duplexing the archived logs, you can establish which destinations are mandatory or optional by using the LOG_ARCHIVE_DEST
and LOG_ARCHIVE_DUPLEX_DEST
parameters. The following rules apply:
Any destination declared by LOG_ARCHIVE_DEST
is mandatory.
Any destination declared by LOG_ARCHIVE_DUPLEX_DEST
is optional if LOG_ARCHIVE_MIN_SUCCEED_DEST = 1
and mandatory if LOG_ARCHIVE_MIN_SUCCEED_DEST = 2
.
You can see the relationship between the LOG_ARCHIVE_DEST_
n
and LOG_ARCHIVE_MIN_SUCCEED_DEST
parameters most easily through sample scenarios.
In this scenario, you archive to three local destinations, each of which you declare as OPTIONAL
. Table 12-1 illustrates the possible values for LOG_ARCHIVE_MIN_SUCCEED_DEST=
n
in this case.
Table 12-1 LOG_ARCHIVE_MIN_SUCCEED_DEST Values for Scenario 1
Value | Meaning |
---|---|
1 |
The database can reuse log files only if at least one of the |
2 |
The database can reuse log files only if at least two of the |
3 |
The database can reuse log files only if all of the |
4 or greater |
|
This scenario shows that even though you do not explicitly set any of your destinations to MANDATORY
using the LOG_ARCHIVE_DEST_
n
parameter, the database must successfully archive to one or more of these locations when LOG_ARCHIVE_MIN_SUCCEED_DEST
is set to 1, 2, or 3.
Consider a case in which:
You specify two MANDATORY
destinations.
You specify two OPTIONAL
destinations.
No destination is a standby database.
Table 12-2 shows the possible values for LOG_ARCHIVE_MIN_SUCCEED_DEST=
n
.
Table 12-2 LOG_ARCHIVE_MIN_SUCCEED_DEST Values for Scenario 2
Value | Meaning |
---|---|
1 |
The database ignores the value and uses the number of |
2 |
The database can reuse log files even if no |
3 |
The database can reuse logs only if at least one |
4 |
The database can reuse logs only if both |
5 or greater |
|
This case shows that the database must archive to the destinations you specify as MANDATORY
, regardless of whether you set LOG_ARCHIVE_MIN_SUCCEED_DEST
to archive to a smaller number of destinations.
Use the REOPEN
attribute of the LOG_ARCHIVE_DEST_
n
parameter to specify whether and when ARCn should attempt to rearchive to a failed destination following an error. REOPEN
applies to all errors, not just OPEN
errors.
REOPEN=
n
sets the minimum number of seconds before ARCn should try to reopen a failed destination. The default value for n is 300 seconds. A value of 0 is the same as turning off the REOPEN
attribute; ARCn will not attempt to archive after a failure. If you do not specify the REOPEN
keyword, ARCn will never reopen a destination following an error.
You cannot use REOPEN
to specify the number of attempts ARCn should make to reconnect and transfer archived logs. The REOPEN
attempt either succeeds or fails.
When you specify REOPEN
for an OPTIONAL
destination, the database can overwrite online logs if there is an error. If you specify REOPEN
for a MANDATORY
destination, the database stalls the production database when it cannot successfully archive. In this situation, consider the following options:
Archive manually to the failed destination.
Change the destination by deferring the destination, specifying the destination as optional, or changing the service.
Drop the destination.
When using the REOPEN
keyword, note the following:
ARCn reopens a destination only when starting an archive operation from the beginning of the log file, never during a current operation. ARCn always retries the log copy from the beginning.
If you specified REOPEN
, either with a specified time the default, ARCn checks to see whether the time of the recorded error plus the REOPEN
interval is less than the current time. If it is, ARCn retries the log copy.
The REOPEN
clause successfully affects the ACTIVE=TRUE
destination state. The VALID
and ENABLED
states are not changed.