資料庫:oracle 11.2.0.4
系統:CentOS 7.9
問題描述:設定log_archive_dest時報錯ORA-16018,如下所示:
SQL> alter system set log_archive_dest='/u01/app/oracle/oradata/orclsou/arch';
alter system set log_archive_dest='/u01/app/oracle/oradata/orclsou/arch'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16018: cannot use LOG_ARCHIVE_DEST with LOG_ARCHIVE_DEST_n or DB_RECOVERY_FILE_DEST
說明:歸檔目錄預設存放於db_recovery_file_dest指定的閃回恢復區,
如果設定了db_recovery_file_dest,就不能設定log_archive_dest.
log_archive_dest與log_archive_dest_n或db_recovery_file_dest不能一起使用
log_archive_dest_1為指定歸檔目錄
log_archive_dest_2引數配置錯誤會導致主備庫切換後新主庫無法傳檔案到新備庫
解決方案:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next log sequence to archive 3
Current log sequence 3
SQL> alter system set log_archive_dest_1='location=/u01/app/oracle/oradata/orclsou/arch';
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/oradata/orclsou/arch
Oldest online log sequence 1
Next log sequence to archive 3
Current log sequence 3
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
如上,成功修改歸檔目錄.