概述
在10g中,如果指定了db_recovery_file_dest 参数,那么归档日志将存放到这个参数指向的目录下,如果同时指定了log_archive_desc,则将同时往这两个参数指定的目录中归档。
1.只设置db_recovery_file_desc参数,log_archive_desc设置为空
SQL> show parameter db_recovery
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /ora10g/flash_recovery_area
db_recovery_file_dest_size big integer 1G
SQL> show parameter log_archive_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest string
log_archive_dest_1 string
log_archive_dest_10 string
log_archive_dest_2 string
log_archive_dest_3 string
log_archive_dest_4 string
log_archive_dest_5 string
log_archive_dest_6 string
log_archive_dest_7 string
log_archive_dest_8 string
log_archive_dest_9 string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_1 string enable
log_archive_dest_state_10 string enable
log_archive_dest_state_2 string enable
log_archive_dest_state_3 string enable
log_archive_dest_state_4 string enable
log_archive_dest_state_5 string enable
log_archive_dest_state_6 string enable
log_archive_dest_state_7 string enable
log_archive_dest_state_8 string enable
log_archive_dest_state_9 string enable
SQL> select name,completion_time from v$archived_log;
no rows selected
SQL> alter system switch logfile;
System altered.
SQL> select name,completion_time from v$archived_log;
NAME
--------------------------------------------------------------------------------
COMPLETION_TIME
-----------------
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_1_4no7w6tg_.arc
20081218 14:07:50
SQL> col name for a100
SQL> set lines 132
SQL> /
NAME COMPLETION_TIME
---------------------------------------------------------------------------------------------------- -----------------
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_1_4no7w6tg_.arc 20081218 14:07:50
2.设置log_archive_desc参数,同时db_recovery_file_desc参数被设置为空。
SQL> alter system set db_recovery_file_dest='' scope=spfile;
System altered.
SQL> alter system set log_archive_dest='/ora10g/arch' scope=spfile;
System altered.
SQL> startup force;
ORACLE instance started.
Total System Global Area 209715200 bytes
Fixed Size 1218580 bytes
Variable Size 104859628 bytes
Database Buffers 100663296 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> alter session set nls_date_format='yyyymmdd hh24:mi:ss';
Session altered.
SQL> col name for a100
SQL> set lines 132
SQL> alter system switch logfile;
System altered.
SQL> select name,completion_time from v$archived_log;
NAME COMPLETION_TIME
---------------------------------------------------------------------------------------------------- -----------------
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_1_4no7w6tg_.arc 20081218 14:07:50
/ora10g/arch/1_2_673797803.dbf 20081218 14:21:01
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_2_4no8nwq9_.arc 20081218 14:21:01
/ora10g/arch/1_3_673797803.dbf 20081218 14:22:15
/ora10g/arch/1_4_673797803.dbf 20081218 14:23:03
SQL> alter system switch logfile;
System altered.
SQL> select name,completion_time from v$archived_log;
NAME COMPLETION_TIME
---------------------------------------------------------------------------------------------------- -----------------
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_1_4no7w6tg_.arc 20081218 14:07:50
/ora10g/arch/1_2_673797803.dbf 20081218 14:21:01
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_2_4no8nwq9_.arc 20081218 14:21:01
/ora10g/arch/1_3_673797803.dbf 20081218 14:22:15
/ora10g/arch/1_4_673797803.dbf 20081218 14:23:03
/ora10g/arch/1_5_673797803.dbf 20081218 14:23:36
6 rows selected.
3.log_archive_desc和db_recovery_file_desc参数被同时设置
SQL> alter system switch logfile;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> alter system switch logfile;
System altered.
SQL> select name,completion_time from v$archived_log;
NAME COMPLETIO
---------------------------------------------------------------------------------------------------- ---------
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_1_4no7w6tg_.arc 18-DEC-08
/ora10g/arch/1_2_673797803.dbf 18-DEC-08
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_2_4no8nwq9_.arc 18-DEC-08
/ora10g/arch/1_3_673797803.dbf 18-DEC-08
/ora10g/arch/1_4_673797803.dbf 18-DEC-08
/ora10g/arch/1_5_673797803.dbf 18-DEC-08
/ora10g/arch/1_6_673797803.dbf 18-DEC-08
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_6_4no8xl3j_.arc 18-DEC-08
/ora10g/arch/1_7_673797803.dbf 18-DEC-08
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_7_4no8y3qy_.arc 18-DEC-08
/ora10g/arch/1_8_673797803.dbf 18-DEC-08
NAME COMPLETIO
---------------------------------------------------------------------------------------------------- ---------
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_8_4no8ys0k_.arc 18-DEC-08
/ora10g/arch/1_9_673797803.dbf 18-DEC-08
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_9_4no8zdk2_.arc 18-DEC-08
/ora10g/arch/1_10_673797803.dbf 18-DEC-08
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_10_4no8zfjg_.arc 18-DEC-08
/ora10g/arch/1_11_673797803.dbf 18-DEC-08
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_11_4no8zg7s_.arc 18-DEC-08
/ora10g/arch/1_12_673797803.dbf 18-DEC-08
/ora10g/flash_recovery_area/EBANK/archivelog/2008_12_18/o1_mf_1_12_4no8zl4s_.arc 18-DEC-08
20 rows selected.
原文地址:http://space.itpub.net/10972173/viewspace-515906
最后
以上就是懵懂母鸡为你收集整理的10g中db_recovery_file_dest和log_archive_dest参数的关系的全部内容,希望文章能够帮你解决10g中db_recovery_file_dest和log_archive_dest参数的关系所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复