Oracle 9i 非归档模式到归档模式设置一例 |
发布时间: 2012/9/12 17:30:54 |
创建归档目录:-
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/Oracle/oradata/orcl/arch' scope=both;
SQL> show parameter log_archive_dest_1 NAME TYPE VALUE ------------------------------------ ---------------------- ------- log_archive_dest_1 string LOCATION=/u01/app/Oracle/orada ta/orcl/arch
NAME TYPE VALUE ------------------------------------ ---------------------- ------- log_archive_dest_state_1 string enable
SQL> alter system switch logfile;
观察并没有产生归档。
SQL> archive log list Database log mode Archive Mode Automatic archival Disabled --不解 Archive destination /u01/app/Oracle/oradata/orcl/arch Oldest online log sequence 4 Next log sequence to archive 4 Current log sequence 6 Google:修改pfile参数文件,设置log_archive_start='TRUE'
*.log_archive_dest_1='LOCATION=/u01/app/Oracle/oradata/orcl/arch' log_archive_start='TRUE'
SQL> startup Oracle instance started.
Fixed Size 452284 bytes Variable Size 335544320 bytes Database Buffers 402653184 bytes Redo Buffers 143360 bytes Database mounted. Database opened.
SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /u01/app/Oracle/oradata/orcl/arch Oldest online log sequence 4 Next log sequence to archive 6 Current log sequence 6
SQL> alter system switch logfile;
---------- ---------- ------ ------ ------ -- --------- 4 1 YES NO NO A 19-APR-11 5 1 YES NO NO A 19-APR-11 6 1 YES NO NO A 19-APR-11 7 1 YES NO NO A 19-APR-11
[Oracle@ORA9ISERV arch]$ pwd /u01/app/Oracle/oradata/orcl/arch [Oracle@ORA9ISERV arch]$ ls -l total 1124 -rw-r----- 1 Oracle oinstall 278528 Apr 19 13:37 1_4.dbf -rw-r----- 1 Oracle oinstall 31232 Apr 19 13:37 1_5.dbf -rw-r----- 1 Oracle oinstall 585728 Apr 19 13:38 1_6.dbf -rw-r----- 1 Oracle oinstall 225280 Apr 19 13:42 1_7.dbf
本文出自:亿恩科技【www.enkj.com】 |