查看数据库的归档状态,可以进入sqlplus
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /scratch/sysvldb/app/sysvldb/product/11.2.0/dbhome_1/dbs/arch
Oldest online log sequence 831
Next log sequence to archive 833
Current log sequence 833
这时,可以看到Automatic archival 的值。已经启动了归档模式。但归档文件的地址却不是默认地址db_recovery_file_dest
通过show parameter recovery 语句查看:
SQL> show parameter recover
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string
db_recovery_file_dest_size big integer 0
db_unrecoverable_scn_tracking boolean TRUE
recovery_parallelism integer 0
修改db_recovery_file_dest:(注意先根据自己磁盘空间改一下db_recovery_file_dest_size)
SQL> alter system set db_recovery_file_dest='/oradbnas/flash_recovery_area' scope=both sid='*';
System altered.
不需要重新启动数据库,修改就会生效。此时查看Archive destination,已经做出了改动:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 894
Next log sequence to archive 895
Current log sequence 896
到DB_RECOVERY_FILE_DEST目录下,可以看到归档日志了。
[@more@]