Oracle 参数 LOG_ARCHIVE_DEST 官方解释,作用,如何配置最优化建议
本站中文解释
LOG_ARCHIVE_DEST参数是用来控制数据库在ARCHIVELOG模式下日志文件存放位置的参数,它是一个多指定字符串参数,每个子串定义一个存档日志文件存放位置、及一些存档日志文件备份和删除等相关操作。
LOG_ARCHIVE_DEST参数可以设置为以下子串:
LOCATION:指定重写存档日志文件的位置,可以是本地目录,也可以是远程服务器、网络映射磁盘等
MAX_FAILURE:在复制存档日志时最多可以失败的次数,一旦失败次数超过此值,将暂停数据库自动增量备份,需要手动执行recover操作进行恢复,可以取值范围:0~10
MAX_CONNECT:在远程复制存档日志时,一次最多可以使用的连接数,可取值范围为:1~10
REOPEN:存档日志文件写满后,要重新打开存档日志文件写入,若此参数设置为default时,数据库自动重新打开,若指定值为120,则在存档日志文件写满120秒后,再重新打开存档日志文件写入
ARCH:用于指定需要备份的存档日志文件是按照归档主键、日志序列号或按照日志变更序列号,默认为归档主键)
多组LOG_ARCHIVE_DEST子串设置,通常格式如下:
LOG_ARCHIVE_DEST_1=’LOCATION=/u01/oracle/arrch/log_arch1’
maxfailure=3 max_connect=5 reopen=120
LOG_ARCHIVE_DEST_2=’LOCATION=”connect net8:192.168.5.5 myarchive” maxfailure=2 max_connect=4 reopen=180
正确设置:首先,根据需要,确定存档日志文件存放的位置以及备份以及删除存档日志文件的相关设置,然后设置LOG_ARCHIVE_DEST参数,只需在终端输入正确格式的参数,就可以将正确设置保存。
以上就是Oracle参数LOG_ARCHIVE_DEST的详细说明及其正确设置步骤。
官方英文解释
Use LOG_ARCHIVE_DEST
to specify the destination to which redo log files will be archived.
Property | Description |
---|---|
Parameter type |
String |
Syntax |
|
Default value |
Null |
Modifiable |
|
Modifiable in a PDB |
No |
Range of values |
Any valid path or device name, except raw partitions |
Basic |
No |
Oracle RAC |
Multiple instances can have different values. |
Note:
For Enterprise Edition users, this parameter has been deprecated in favor of the LOG_ARCHIVE_DEST_
n
parameters. If Oracle Enterprise Edition is not installed or it is installed, but you have not specified any LOG_ARCHIVE_DEST_
n
parameters, this parameter is valid.
LOG_ARCHIVE_DEST
is applicable only if you are running the database in ARCHIVELOG
mode or are recovering a database from archived redo logs. LOG_ARCHIVE_DEST
is incompatible with the LOG_ARCHIVE_DEST_
n
parameters, and must be defined as the null string (“”) or (‘ ‘) when any LOG_ARCHIVE_DEST_
n
parameter has a value other than a null string. Use a text string to specify the default location and root of the disk file or tape device when archiving redo log files. (Archiving to tape is not supported on all operating systems.) The value cannot be a raw partition.
If LOG_ARCHIVE_DEST
is not explicitly defined and all the LOG_ARCHIVE_DEST_
n
parameters have null string values, LOG_ARCHIVE_DEST
is set to an operating system-specific default value on instance startup.
To override the destination that this parameter specifies, either specify a different destination for manual archiving or use the SQL*Plus statement ARCHIVE LOG START
filespec
for automatic archiving, where filespec
is the new archive destination. To permanently change the destination, use the statement ALTER SYSTEM SET LOG_ARCHIVE_DEST =
filespec
, where filespec
is the new archive destination.
Neither LOG_ARCHIVE_DEST
nor LOG_ARCHIVE_FORMAT
have to be complete file or directory specifiers themselves; they only need to form a valid file path after the variables are substituted into LOG_ARCHIVE_FORMAT
and the two parameters are concatenated together.
See Also:
-
Oracle Database Backup and
Recovery User’s Guide -
“LOG_ARCHIVE_DUPLEX_DEST”, “LOG_ARCHIVE_MIN_SUCCEED_DEST”, and “V$ARCHIVE_DEST” for more information on setting this parameter
-
Your Oracle operating system-specific documentation for the default value and for an example of how to specify the destination path or file name using
LOG_ARCHIVE_DEST