SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=/oracle/oradata/szdb/archive'; # /oracle/oradata/szdb/archive必须和前面mkdir -p oradata/szdb/archive操作建立的路径一模一样
SQL> alter system set log_archive_format='%t_%s.dbf' scope=spfile;
SQL> alter system set log_archive_start=true scope=spfile;
重新启动数据库,使修改结果生效
SQL> shutdown immediate;
察看归档模式
SQL> startup
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /oracle/oradata/szdb/archive
Oldest online log sequence 565
Next log sequence to archive 567
Current log sequence 567
以上alter system set操作会在数据库的spfile@sid.ora和init@sid.ora文件中新增以下参数