041223

来源:互联网 发布:notepad 格式化js 编辑:程序博客网 时间:2024/05/17 06:58

archivelog mode

shutdown immediate;
start mount;
alter database archivelog;
alter database open;
archive log list;

自动归档
alter system archive log start/stop;//启动归档进程
alter system set log_archive_dest_1 =
"location=d:/oracle/oradata/test/arch1/ mandatory"

init.ora
log_archive_start = true
log_archive_format='arc%s.log'
log_archive_dest_1 = "location=d:/oracle/oradata/test/arch1/ mandatory"
log_archive_max_processes = 2
FORMAT
S 序列号,要补0
s 序列号,不补0

Specifying Multiple Archive Log Destinations
1.Local disk
log_archive_dest_1 = "LOCATION=/archive1"

2.Remote standby database
log_archive_dest_2 = "SERVICE=standby_db1"

Log_archive_dest_n Options
set archive location as MANDATORY or OPTIONAL
Define time before retry in case of failures

log_archive_dest_1 = "LOCATION=/archive/
         MANDATORY REOPEN"
必须生成好了之后,redologfile才能被覆盖
log_archive_dest_2 = "SERVICE=standby_db1
         MANDATORY REOPEN=600"
指定时间尝试,过了之后日值记录下来
log_archive_dest_3 = "LOCATION=/archive2/
         OPTIONAL"
默认,就算在线的日志文件没有成功的归档,
这个从做日志文件还是可以继续使用的。

LOG_ARCHIVE_MIN_SUCCEED_DEST = 2
至少两个成功
An online redo log group can be reused only if:
Archiving has been done to all mandatory locations
The number of local locations archived is greater
than or equal to the value of the
LOG_ARCHIVE_MIN_SUCCEED_DEST parameter

目录禁用
An archival destination can be disabled by using
the dynamic initialization parameter
LOG_ARCHIVE_DEST_STATE_n
LOG_ARCHIVE_DEST_STATE_2 = DEFER/ENABLE
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2 = DEFER/ENABLE

 

原创粉丝点击