ORA-16018解决办法

本文涉及的产品
日志服务 SLS,月写入数据量 50GB 1个月
简介:

因为11g归档日志默认路径是:DB_RECOVERY_FILE_DEST  空间大小是2G 导致日志撑满,数据库hang住了

修改归档日志报ORA-16018错误:

先创建归档日志存放目录:

 

orahost:root:[/oracle]#mkdir arch_log

orahost:root:[/oracle]#chown –R oracle:oinstall ./arch_log

orahost:root:[/oracle]#chmod 775 ./arch_log

orahost:root:[/oracle/arch_log]#su – oracle

然后修改路径:

SQL> alter system set log_archive_dest='/arch_log';
alter system set log_archive_dest='/arch_log'
*
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

[oracle@bsqkpi dbs]$ oerr ora 16018
16018, 00000, "cannot use %s with LOG_ARCHIVE_DEST_n or DB_RECOVERY_FILE_DEST"
// *Cause:  One of the following events caused an incompatibility:
//          1) Parameter LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST 
//          was in use when a LOG_ARCHIVE_DEST_n (n = 1...31) parameter 
//          was encountered while fetching initialization parameters.
//          2) An ALTER SYSTEM ARCHIVE LOG START TO command was in effect when
//          a LOG_ARCHIVE_DEST_n parameter was encountered while fetching
//          initialization parameters.
//          3) A LOG_ARCHIVE_DEST_n parameter was in use when an ALTER SYSTEM
//          command was used to define a value for either the LOG_ARCHIVE_DEST
//          or LOG_ARCHIVE_DUPLEX_DEST parameter.
//          4) Parameter DB_RECOVERY_FILE_DEST was in use when an attempt
//          was made to use an ALTER SYSTEM or ALTER SESSION command to
//          define a value for LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST.
// *Action: Eliminate any incompatible parameter definitions.

提示有冲突

进入pfile把DB_recovery_FILE_DEST=……***掉

然后

SQL> create spfile from pfile;

File created.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 2505338880 bytes
Fixed Size                  2230952 bytes
Variable Size             620758360 bytes
Database Buffers         1862270976 bytes
Redo Buffers               20078592 bytes
Database mounted.
Database opened.
SQL> alter system set log_archive_dest='/arch_log';------修改成功

System altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /arch_log
Oldest online log sequence     136
Next log sequence to archive   138
Current log sequence           138
SQL>

 


本文转自 abc3486389 51CTO博客,原文链接:http://blog.51cto.com/1336014/1422298

相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
相关文章
|
SQL 关系型数据库 MySQL
ORA-01948和ORA-04052错误的解决方法
一、事件背景: 业务人员在创建一个物化视图的时候,报了以下错误: SQL> CREATE MATERIALIZED VIEW MV_RETAIL_wbmout_R 2 TABLESPACE SAPDATA 3 PCTUSED 0 ...
1847 0
|
SQL Oracle 关系型数据库
【ora 错误及解决方法】ORA-01652
ORA-01652:unable to extend temp segment by num in tablespace name 产生原因:ORACLE临时段表空间不足,因为ORACLE总是尽量分配连续空间,一旦没有足够的可分配空间或者分配不连续就会出现上述的现象。
1213 0
|
关系型数据库 数据库 Windows
|
Oracle 关系型数据库 数据库
|
Oracle 关系型数据库
|
关系型数据库 数据库 Oracle
|
SQL Oracle 网络协议