Linux下安裝Oracle11g , MEMORY_TARGET(AMM)小於/dev/shm處理(ORA-00845)

tolywang發表於2010-11-18

 

Oracle 11g的Linux版本在修改了MEMORY_TARGET或者SGA_TARGET後啟動可能會報錯:

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system

 

這個問題是由於設定SGA的大小超過了作業系統/dev/shm的大小:

[root@enterprice64 ~]# df -k /dev/shm
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 4089416 0 4089416 0% /dev/shm

Oracle在metalink的文件:Doc ID: Note:460506.1中進行了說明。解決這個問題只有兩個方法,一種是修改初始化參

數,使得初始化引數中SGA的設定小於/dev/shm的大小,另一種方法就是調整/dev/shm的大小。

修改/dev/shm的大小可以透過修改/etc/fstab來實現:

[root@enterprice64 ~]# vi /etc/fstab

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
LABEL=/data /data ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
#tmpfs /dev/shm tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=10240M 0 0
LABEL=/home /home ext3 defaults 1 2
LABEL=/opt /opt ext3 defaults 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
LABEL=/usr /usr ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
LABEL=SWAP-sda8 swap swap defaults 0 0


[root@enterprice64 ~]# umount /dev/shm
[root@enterprice64 ~]# mount /dev/shm
[root@enterprice64 ~]# df -k /dev/shm
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 10485760 0 10485760 0% /dev/shm
[root@enterprice64 ~]# su - oracle
[oracle@enterprice64 ~]$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Tue Oct 23 15:42:42 2007

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 4743446528 bytes
Fixed Size 2143824 bytes
Variable Size 3892316592 bytes
Database Buffers 805306368 bytes
Redo Buffers 43679744 bytes
Database mounted.
Database opened.

修改/etc/fstab,重新mount /dev/shm,然後就可以啟動資料庫了。

轉自   http://yangtingkun.itpub.net/post/468/408235 

 

 

 

相關metalink 文章 :

 


ORA-00845 When Starting Up An 11g Instance With AMM Configured. [ID 460506.1]

Applies to:
Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.2.0.2.0 - Release: 11.1 to 11.2
Linux x86
Linux x86-64

Symptoms

On a Linux system, trying to start up an 11g instance could fail with the following error:

ORA-845: MEMORY_TARGET not supported on this system

In the alert log, you could or could not see the below messages:

ORA-04031 errors

OR

Starting ORACLE instance (normal)
WARNING: You are trying to use the MEMORY_TARGET feature.
This feature requires the /dev/shm file system to be mounted for at
Least bytes.The /dev/shm is either not mounted or is mounted
With available space less than this size.
Please fix this so that MEMORY_TARGET can work as expected.
Current available is and used is bytes.memory_target needs larger /dev/shm

If ORA-04031 is seen in the alert log, sometimes you can not establish new connections due to this

problem.
Changes
Installed 11g, or created a new database on 11g and is starting to use the AMM (Automatic Memory

Management) feature.
Cause
This feature requires the /dev/shm file system to be mounted for at least %llu bytes.
/dev/shm is either not mounted or is mounted with available space less than this size.

Explanation:

AMM (Automatic Memory Management) is a new feature in 11 which manages both SGA and PGA.

MEMORY_TARGET is used instead of SGA_TARGET and MEMORY_MAX_TARGET is used instead of SGA_MAX_SIZE

(defaults to MEMORY_TARGET ).

It uses /dev/shm on Linux. If max_target set over /dev/shm size, you get the error messages.


Solution
1. If you are installing Oracle 11g on a Linux system, note that Memory Size (SGA and PGA), which sets
the initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET, cannot be greater than the shared

memory filesystem (/dev/shm) on your operating system. To resolve the current error, increase the

/dev/shm file size. For example:

# mount -t tmpfs shmfs -o size=7g /dev/shm

Also, to make this change persistent across system restarts, add an entry in /etc/fstab similar to the

following:

shmfs /dev/shm tmpfs size=7g 0

2. This error may also occur if /dev/shm is not properly mounted. Make sure your df output is similar to

the following:

$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
...
shmfs 6291456 832356 5459100 14% /dev/shm


3. If configuring AMM is not possible due to lack of space on /dev/shm mount point, you can configure

ASMM instead of AMM, i.e. set SGA_TARGET, SGA_MAX_SIZE and PGA_AGGREGATE_TARGET instead of

MEMORY_TARGET.


References
NOTE:752899.1 - /dev/shm Filled Up With Files In Format JOXSHM_EXT_xxx_SID_xxx

 相關的

 

--------------------------------------------------------------------------------
產品
--------------------------------------------------------------------------------

Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
關鍵字
--------------------------------------------------------------------------------
MEMORY_TARGET; START INSTANCE
錯誤
--------------------------------------------------------------------------------
ORA-4031; ORA-845; 04031 ERROR 

 

 

 

 

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

相關文章