oracle 10g 归档日志生成的问题?

[复制链接]
查看11 | 回复2 | 2013-2-25 14:51:24 | 显示全部楼层 |阅读模式
我设置了两个归档日志路径,但是进行日志切换后,只有一个日志路径有日志文件,这是为什么呢?
设置日志路径:
sql>alter system set log_archive_dest_1='location=/arch' scope=both;
sql>alter system set log_archive_dest_2='location=USE_DB_RECOVERY_FILE_DEST' scope=both;
进行日志切换:
sql>alter syste switch logfile;
查询日志序列号:
sql>archive log list;
SQL> archive log list;
Database log mode
Archive Mode
Automatic archival
Enabled
Archive destination
/USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 771
Next log sequence to archive 773
Current log sequence 773
但是我在/arch下查到一个为772日志序列号的归档文件,在/USE_DB_RECOVERY_FILE_DEST下没有查到,请教高手?
我又加了一个归档路径:
sql>alter system log_archive_dest_10='location=/arch1' scope=both;
再使用切换:
sql>alter system switch logfile;
发现现在是制定的log_archive_dest_1和log_archive_dest_10里面有新生成的归档日志,日志序列号相同,但是log_archive_dest_2(指向日志闪回区)的,去没有新生成的归档日志,什么原因??
[ 本帖最后由 perryhappy 于 2011-5-3 20:45 编辑 ]
回复

使用道具 举报

千问 | 2013-2-25 14:51:24 | 显示全部楼层
alter system set log_archive_dest_10='location=USE_DB_RECOVERY_FILE_DEST' scope=both;
回复

使用道具 举报

千问 | 2013-2-25 14:51:24 | 显示全部楼层
why 10 not 2?
You can explicitly set up one or more other LOG_ARCHIVE_DEST_n destinations to point to a flash recovery area. For example, you can optionally:
?Configure destinations other than LOG_ARCHIVE_DEST_10
For example, an existing Data Guard configuration may have already used the LOG_ARCHIVE_DEST_10 destination for another purpose, or you may want to release the LOG_ARCHIVE_DEST_10 destination for other uses.
To configure another archival destination to point to the flash recovery area, you must specify the LOCATION=USE_DB_RECOVERY_FILE_DEST attribute to define the new destination. For example:
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST ARCH MANDATORY REOPEN=5 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)'
The implicit setting (for LOG_ARCHIVE_DEST_10 to use the flash recovery area) will be cleared.
?Configure destinations in addition to LOG_ARCHIVE_DEST_10 destination for use after a role transition
For example, you can configure one destination to be valid for standby redo log archival when the database operates in the standby role and another destination to be valid for online redo log archival when the database operates in the primary role.
To configure a LOG_ARCHIVE_DEST_n destination in addition to LOG_ARCHIVE_DEST_10, you must explicitly specify both destinations:
LOG_ARCHIVE_DEST_9='LOCATION=USE_DB_RECOVERY_FILE_DEST ARCH MANDATORY REOPEN=5 VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLE)'
LOG_ARCHIVE_DEST_10='LOCATION=USE_DB_RECOVERY_FILE_DEST ARCH MANDATORY REOPEN=5 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)'
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行