Oracle错误解决 ORA-00844: Parameter not taking MEMORY_TARGET into account, see alert log for more inform

来源:互联网 发布:单片机与传感器 编辑:程序博客网 时间:2024/05/22 23:57

Oracle的内存管理方式改为自动内存管理时,出现的错误。

 

 

本来这个错误不应该算作Oracle的bug,由于设置了Oracle的MEMORY_TARGET参数的值小于了SGA_TARGET和PGA_TARGET的总和,因此报错。

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

SQL*Plus: Release11.1.0.6.0 - Production on Wed Jan 16 07:30:33 2008

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


Connected to:
Oracle Database11gEnterprise Edition Release11.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 integer100M
sga_target                           big integer252M
SQL> alter system set memory_target =220mscope = 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.

 

原创粉丝点击