签到成功

知道了

CNDBA社区CNDBA社区

启动数据库报ORA-00845: MEMORY_TARGET not supported on this system

2016-09-06 22:31 3852 1 原创 故障处理
作者: leo
1、今天将虚拟机内存2g改为1.5g的时候启动报ORA-00845
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
SQL> show parameter memory
NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address         integer     0
memory_max_target             big integer 800M
memory_target                 big integer 800M
shared_memory_address             integer     0

在Oracle 11g中如果采用AMM内存管理,那么当MEMORY_TARGET的值大于/dev/shm的时候,就会报ORA-00845: MEMORY_TARGET not supported on this system错误,http://www.cndba.cn/leo1990/article/242

解决办法增加/dev/shm大小,http://www.cndba.cn/leo1990/article/242

/dev/shm的默认值是系统总内存的一半http://www.cndba.cn/leo1990/article/242http://www.cndba.cn/leo1990/article/242http://www.cndba.cn/leo1990/article/242http://www.cndba.cn/leo1990/article/242

[root@dg1 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       75G   20G   52G  28% /
tmpfs         750M  280K  749M   1% /dev/shm

[root@dg1 ~]# mount -o size=4G -o nr_inodes=1000000 -o noatime,nodiratime -o remount /dev/shm
[root@dg1 ~]# df -h
Filesystem     Size  Used Avail Use% Mounted on
/dev/sda2      75G   20G   52G  28% /
tmpfs        4.0G  280K  4.0G   1% /dev/shm

 编辑文件 vi /etc/fstab(第二次没有编辑这个文件数据库也启动了,请指教)http://www.cndba.cn/leo1990/article/242

http://www.cndba.cn/leo1990/article/242
http://www.cndba.cn/leo1990/article/242

UUID=f2e7340d-6d13-4fbc-8fda-5ff2038091eb /                       ext4    defaults        1 1
UUID=237977e7-5680-4c09-8789-ff5b2c2d274c swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults,size=4G        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
~

然后启动数据库http://www.cndba.cn/leo1990/article/242

[oracle@dg1 ~]$ export ORACLE_SID=orcl
[oracle@dg1 ~]$ sqlplus /nolog
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area  835104768 bytes
Fixed Size           2257840 bytes
Variable Size          541068368 bytes
Database Buffers          289406976 bytes
Redo Buffers           2371584 bytes
Database mounted.
Database opened.
SQL> show parameter memory
NAME                     TYPE     VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address         integer     0
memory_max_target             big integer 800M
memory_target                big integer 800M
shared_memory_address           integer     0

官方解析

Starting with Oracle Database 11g, the Automatic Memory Management 
feature requires more shared memory (/dev/shm)and file descriptors. The 
size of the shared memory should be at least the greater of 
MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the 
computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero 
value, and an incorrect size is assigned to the shared memory, it will 
result in an ORA-00845 error at startup.

解决问题建议  

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. 
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.

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
leo

leo

关注

坚持你的坚持

  • 202
    原创
  • 0
    翻译
  • 39
    转载
  • 16
    评论
  • 访问:766273次
  • 积分:1270
  • 等级:核心会员
  • 排名:第8名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ