设置一下归档文件的目录 ……
alter system set log_archive_dest='location=F:\archives';
结果
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
……突然之间没看懂报错信息以为是不让我设置这个目录因为跟 后面的2个目录有重复
结果就一顿狂试 还是不行……
后来没办法 干脆…… 设置在
Pfile 中加了一条log_archive_dest='location=F:\archives';
覆盖了spfile中的东东;
这回可以了……
可是我还想设置log_archive_dest_1
结果又报错了
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed
with SPFILE
巨不解……
我又企图在pfile中添加…… 哦这回加进去了 启动后spfile 中干脆不显示了……
知道后来仔细思考了一下前面的报错语句才发现 哦
原来是log_archive_dest 和db_recovery_dest 不可共存
而log_archive_dest1 和log_archive_dest
亦不能共存……
可是我偏偏强行的在Pfile中添加了log_archive_dest
估计这就是导致上面的那个不可以在SPFILE 中增量替换 log_archive_dest_1
这个XYZ的错误的罪魁祸首吧……
总之最后去掉log_archive_dest 的设置
乖乖的用 log_archive_dest_1 和db_recovery_dest 就成功修改了……
(当然了 企图设置
alter system set log_archive_dest='' 是不行的 因为我的db_recovery_dest
被设置了
而反过来想把db_recovery_dest 设置为空也是一样的道理…… 结果只能在此重建spfile .........
)
解决办法:
可修改pfile文件内容如下:
查看SPFILE
SQL> show parameter
spfile
NAME TYPE VALUE
-------------------------------------------------------------
spfile
string /u01/app/oracle/oradata/RAC/spfileRAC.ora
创建一个PFILE文件,如init.ora.889999992117,加内容
# pfile link to
SPFILE
SPFILE='/u01/app/oracle/oradata/RAC/spfileRAC.ora'
alter system set
log_archive_dest=''
DB启动用:
startup
pfile=/u01/app/oracle/admin/RAC/pfile/init.ora.889999992117
另外,从下列可看出,下列修改是修改静态参数(ORA-02097:),只能加scope=spfile,然后sql>
startup force重启
注意:用SQL>
STARTUP FORCE 必须用sqlplus / as sysdba
登陆才行
SQL> alter system set
log_archive_dest='';
alter system set
log_archive_dest=''
*
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
即:
SQL>
create pfile from spfile;
File created.
SQL>
alter system set log_archive_dest='' scope=spfile;
[oracle@sw2 ~]$ sqlplus / as
sysdba
SQL*Plus: Release 10.2.0.4.0
- Production on Fri Jan 8 16:36:46 2016
Copyright (c) 1982, 2007,
Oracle. All Rights Reserved.
Connected
to:
Oracle Database 10g
Enterprise Edition Release 10.2.0.4.0 -
Production
With the Partitioning, OLAP,
Data Mining and Real Application Testing options
SQL> startup force
(是shutdown abort +
startup的组合,最好不要这么用)
ORACLE instance
started.
Total System Global Area
402653184 bytes
Fixed Size 1267716
bytes
Variable Size
281020412
bytes
Database Buffers
113246208
bytes
Redo Buffers
7118848
bytes
Database
mounted.
Database
opened.