Linux下安装Oracle11g , MEMORY_TARGET(AMM)小于/dev/shm处理(ORA-00845)

本文介绍了解决Oracle11g在Linux环境下启动时出现ORA-00845错误的方法。此错误通常由设置的MEMORY_TARGET或SGA_TARGET超过/dev/shm分区大小引起。文中提供了调整/dev/shm大小的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/35489/viewspace-678387/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值