问题描述:巡检时发现某一个节点数据库down了,通过sqlplus 进行系统时显示连接的是一个空实例,尝试通过startup重启数据库报错,提示MEMORY_TARGETnot supported on this system,查看告警日志报MEMORY_TARGET失败,要增加/dev/shm大小才可以解决问题
登录数据库时报错信息如下:
[oracle@db01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Productionon Mon Oct 30 09:26:35 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
后台日志报如下信息:
Starting ORACLE instance (normal)
WARNING: You are trying to use theMEMORY_TARGET feature. This feature requires the /dev/shm file system to bemounted for at least 13522436096 bytes. /dev/shm is either not mounted or ismounted with available space less than this size. Please fix this so that MEMORY_TARGETcan work as expected. Current available is 12203786240 and used is 454021120bytes. Ensure that the mount point is /dev/shm for this directory.
memory_target needs larger /dev/shm
问题分析:
由于Oracle11g中使用的是AMM,当MEMORY_TARGET大于/dev/shm时就提示不支持此系统,从而报错无法启动数据库,由于/dev/shm是通过tmpfs通过大小的,在Linux环境中可以通过修改此大小解决问题
解决方法:
1、 查看当前的tmpfs大小信息
[oracle@i60001~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_db01-LogVol02 229G 65G 153G 30% /
tmpfs 12G 434M 12G 4% /dev/shm--此处要修改
/dev/sde1 485M 40M 420M 9% /boot
/dev/mapper/vg_db01-LogVol00 30G 5.0G 24G 18% /usr
[oracle@i60001~]$ mount -o size=20G -onr_inodes=1000000 -o noatime,nodiratime -o remount /dev/shm
mount: onlyroot can do that
修改tmpfs大小要通过root用户下面操作,切换到root用户
[oracle@i60001~]$ su root
Password:
2、修改tmpfs大小
[root@db01oracle]# mount -o size=20G -o nr_inodes=1000000 -o noatime,nodiratime-o remount /dev/shm
[root@db01oracle]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_db01-LogVol02 229G 65G 153G 30% /
tmpfs 20G 434M 20G 3% /dev/shm--修改后的大小
/dev/sde1 485M 40M 420M 9% /boot
/dev/mapper/vg_db01-LogVol00 30G 5.0G 24G 18% /usr
3、修改tmpfs大小后,再登录数据库中重启实例
[oracle@db01~]$ sqlplus / as sysdba
SQL*Plus:Release 11.2.0.4.0 Production on Mon Oct 30 09:42:02 2017
Copyright (c)1982, 2013, Oracle. All rights reserved.
Connected toan idle instance.
SQL>startup;
ORACLEinstance started.
Total SystemGlobal Area 1.3462E+10 bytes
Fixed Size 2265984 bytes
Variable Size 7381978240 bytes
DatabaseBuffers 6039797760 bytes
Redo Buffers 38014976 bytes
Databasemounted.
Database opened.-显示启动成功
--查询当前的数据库实例是否正常
SQL>select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
本文出自 “我主梁缘” 博客,请务必保留此出处http://xiaocao13140.blog.51cto.com/6198256/1977439
原文地址:http://xiaocao13140.blog.51cto.com/6198256/1977439