ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE

studywell發表於2014-11-17

記錄遇到一個錯誤,環境:11g
SQL> alter system set log_archive_dest_1='/arch' scope=spfile;
alter system set log_archive_dest_1='/arch' scope=spfile
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE
Oracle 官網查錯:
ORA-16179: incremental changes to "string" not allowed with SPFILE
Cause: Incremental changes to a log_archive_dest_n parameter cannot be made when using an SPFILE.
Action: Specify either LOCATION or SERVICE plus all other attributes to be set in one ALTER SYSTEM/SESSION SET command.

SQL> alter system set log_archive_dest_1='location=/arch' scope=spfile;
System altered.
看官網上說log_archive_dest 和log_archive_dest_1不能同時設定,做個測試
SQL> alter system set log_archive_dest='/arch' scope=spfile;
SQL> startup mount
ORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST

報錯,使用備用pfile檔案,重新啟動資料庫;
官網內容如下:
LOG_ARCHIVE_DEST is applicable only if you are running the database in ARCHIVELOG mode or are recovering a database from archived redo logs. LOG_ARCHIVE_DEST is incompatible with the LOG_ARCHIVE_DEST_n parameters, and must be defined as the null string ("") or (' ') when any LOG_ARCHIVE_DEST_n parameter has a value other than a null string. Use a text string to specify the default location and root of the disk file or tape device when archiving redo log files. (Archiving to tape is not supported on all operating systems.) The value cannot be a raw partition.

If LOG_ARCHIVE_DEST is not explicitly defined and all the LOG_ARCHIVE_DEST_n parameters have null string values, LOG_ARCHIVE_DEST is set to an operating system-specific default value on instance startup.

To override the destination that this parameter specifies, either specify a different destination for manual archiving or use the SQL*Plus statement ARCHIVE LOG START filespec for automatic archiving, where filespec is the new archive destination. To permanently change the destination, use the statement ALTER SYSTEM SET LOG_ARCHIVE_DEST = filespec, where filespec is the new archive destination.

Neither LOG_ARCHIVE_DEST nor LOG_ARCHIVE_FORMAT have to be complete file or directory specifiers themselves; they only need to form a valid file path after the variables are substituted into LOG_ARCHIVE_FORMAT and the two parameters are concatenated together.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29519108/viewspace-1336467/,如需轉載,請註明出處,否則將追究法律責任。

相關文章