tempfs shm oracle sga,ORA-000845 与 /dev/shm(tempfs)

本文介绍了如何解决Oracle数据库因内存不足导致的问题,包括调整MEMORY_TARGET参数和增大tempfs文件系统大小。通过设置memory_target为1G并临时调整tempfs大小,然后通过修改/etc/fstab实现tempfs的永久增大,以确保数据库正常运行。
摘要由CSDN通过智能技术生成

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.

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值