开源中文网

您的位置: 首页 > 数据库应用 > Oracle > 正文

快速掌握解决ORA-00844错误的实用方法

来源:  作者:

问题:我在将Oracle的内存管理方式改为自动内存管理时,出现ORA-00844错误,请问应当怎样解决?

解答:这个错误不应该算作Oracle的bug,由于你设置了Oracle的MEMORY_TARGET参数的值小于了SGA_TARGET和PGA_TARGET的总和,因此才会报错。

 

[oracle@yangtk ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Jan 16 07:30:33 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set pages 100 lines 120 
SQL> show parameter target

NAME TYPE VALUE
------------------------------------ -----------
archive_lag_target integer 0
db_flashback_retention_target integer 1440
fast_start_io_target integer 0
fast_start_mttr_target integer 0
memory_max_target big integer 0
memory_target big integer 0
pga_aggregate_target big integer 100M
sga_target big integer 252M
SQL> alter system set memory_target = 220m scope = spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-00844: Parameter not taking MEMORY_TARGET into account, 
see alert log for more information

其实这个错误很多情况下是由于人为设置的参数太小造成的。但是Oracle在此处存在两个问题,首先,没有通过错误信息告诉用户,是哪些参数的值设置导致的问题。第二点尤为严重,Oracle的错误信息显示,进一步的错误信息去alert文件中寻找,但是:

 

SQL> host [oracle@yangtk ~]$ tail -

30 /data/oracle/diag/rdbms/ora11g_p/ora11g/trace/alert_ora11g.log 
Wed Jan 16 07:42:00 2008
ARCH shutting down
ARC1: Archival stopped
Wed Jan 16 07:42:00 2008
ARCH shutting down
ARC0: Archival stopped
Wed Jan 16 07:42:00 2008
ARC3: Becoming the 'no FAL' ARCH
ARC3: Becoming the 'no SRL' ARCH
ARC3: Archiving disabled
ARCH shutting down
ARC3: Archival stopped
ARC2: Archival stopped
Thread 1 closed at log sequence 268
Successful close of redo thread 1
Completed: ALTER DATABASE CLOSE NORMAL
ALTER DATABASE DISMOUNT
Completed: ALTER DATABASE DISMOUNT
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Wed Jan 16 07:42:02 2008
Stopping background process VKTM: 
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Wed Jan 16 07:42:05 2008
Instance shutdown complete

 

大家可以发现,在alert文件中没有任何的错误信息,看来Oracle在尝试启动直接进行了参数的检查,这个检查过程就直接报错了,不过即使报错也应该记录到alert文件中,何况错误信息中明明显示要在alert文件中寻找进一步的错误。

 

解决方法:创建pfile,然后修改MEMORY_TARGET的值即可解决此问题。

示例:

 

SQL> create pfile='/home/oracle/initora11g.ora' from spfile;

File created.

SQL> host echo "memory_target=367001600" >> /home/oracle/initora11g.ora

SQL> startup pfile=/home/oracle/initora11g.ora
ORACLE instance started.

Total System Global Area 267825152 bytes
Fixed Size 1299316 bytes
Variable Size 176163980 bytes
Database Buffers 88080384 bytes
Redo Buffers 2281472 bytes
Database mounted.
Database opened.

SQL> create spfile from pfile='/home/oracle/initora11g.ora';
File created.

Tags:ORA-00844错误
相关文章列表:
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明