你好,游客 登录 注册 搜索
背景:
阅读新闻

ORA-000845 与 /dev/shm(tempfs)

[日期:2013-11-15] 来源:Linux社区  作者:Leshami [字体:大 中 小]

3、故障解决
从上面的情形可知,我们可以通过增加tempfs文件系统的大小或者是适当减少MEMORY_TARGET的值来解决
a、调整参数memory_target
[Oracle@linux1 ~]$ grep memory $ORACLE_HOME/dbs/initcatadb.ora
memory_target=521M
[oracle@linux1 ~]$ export ORACLE_SID=catadb
[oracle@linux1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 14 11:51:57 2013

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

Connected to an idle instance.

idle> startup nomount;
ORACLE instance started.

Total System Global Area  548216832 bytes
Fixed Size                  1337804 bytes
Variable Size            331351604 bytes
Database Buffers          209715200 bytes
Redo Buffers                5812224 bytes
idle> shutdown abort;
ORACLE instance shut down.

 

b、增加tempfs大小
[oracle@linux1 ~]$ grep memory $ORACLE_HOME/dbs/initcatadb.ora
memory_target=1G
#下面的方法用于临时调整tempfs的大小,重启后失效
#即将tempfs的大小调整到1200M,inode数量调整到1000000,此时大约可可存放一百万个小文件
[root@linux1 ~]# mount -o size=1200M -o nr_inodes=1000000 -o noatime,nodiratime -o remount /dev/shm
[root@linux1 ~]# df -h | grep shm
tmpfs                1.2G  154M  1.1G  13% /dev/shm
[root@linux1 ~]# su - oracle
[oracle@linux1 ~]$ export ORACLE_SID=catadb
[oracle@linux1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 14 12:04:02 2013

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

Connected to an idle instance.

idle> startup nomount;
ORACLE instance started.

Total System Global Area 1071333376 bytes
Fixed Size                  1341312 bytes
Variable Size            620759168 bytes
Database Buffers          444596224 bytes
Redo Buffers                4636672 bytes

# Author : Leshami
#  Blog  : http://www.linuxidc.com

#永久增加tempfs的大小,直接修改/etc/fstab
vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=2048M 0 0
修改之后remount
mount -o remount /dev/shm

 

4、Doc ID 1399209.1
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 must be at least the greater of the MEMORY_MAX_TARGET and MEMORY_TARGET parameters for each Oracle instance on the computer. If the MEMORY_MAX_TARGET parameter or the MEMORY_TARGET parameter is set to a nonzero value, and an incorrect size is assigned to the shared memory, it results in an ORA-00845 error at startup.
On Linux systems, if the operating system /dev/shm mount size is too small for the Oracle system global area (SGA) and program global area (PGA), then you encounter the following error:

The cause of this error is an insufficient /dev/shm allocation. The total memory size of the SGA and PGA, which sets the initialization parameter MEMORY_TARGET or MEMORY_MAX_TARGET, cannot be greater than the shared memory file system (/dev/shm) on your operating system.

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux
相关资讯       ORA-000845 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款