处理故障时,发现startup实例失败,报错ORA-00845: MEMORY_TARGET not supported on this system
SYS@orcl1> startup;
ORA-00845: MEMORY_TARGET not supported on this system
查看alert日志,报错如下
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 47244640256 bytes. /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 46169579520 and used is 21271977984 bytes. Ensure that the mount point is /dev/shm for this directory.
memory_target needs larger /dev/shm
root用户下df -h查看,空闲/dev/shm小于需要47G,
[root@db1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 100G 17G 84G 17% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 22G 42G 35% /dev/shm
tmpfs 63G 1.1G 62G 2% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/mapper/ol-home 159G 33G 127G 21% /u01
处理办法:
[root@db1 ~]# mount -o remount,size=72G /dev/shm
[root@db1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ol-root 100G 17G 84G 17% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 72G 22G 51G 31% /dev/shm
tmpfs 63G 1.1G 62G 2% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/mapper/ol-home 159G 33G 127G 21% /u01
再次startup,顺利启动
[root@db1 ~]# su - oracle
Last login: Thu Aug 10 10:18:34 CST 2023 on pts/0
orcl1:/home/oracle@db1> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 10 10:22:10 2023
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SYS@orcl1> startup;
ORACLE instance started.
Total System Global Area 4.7034E+10 bytes
Fixed Size 2263936 bytes
Variable Size 2.3354E+10 bytes
Database Buffers 2.3622E+10 bytes
Redo Buffers 55246848 bytes
Database mounted.
Database opened.
SYS@orcl1>
后续处理
方案一、修改/etc/fstab文件,修改后/dev/shm行如下
/dev/shm tmpfs defaults,size=72G 0 0
方案二、从AMM调整为ASMM--rac环境待验证
alter system reset memory_max_target scope =spfile sid='orcl1';
alter system reset memory_target=0 scope =spfile sid='orcl1';
alter system set sga_max_size=40G scope=spfile sid='orcl1';
alter system set sga_target=40G scope=spfile sid='orcl1';
alter system set pga_aggregate_target=20G scope=spfile sid='orcl1';
mos文档:ORA-00843, ORA-00849 When Trying To Change SGA_TARGET With MEMORY_MAX_TARGET=0 Being Active (文档 ID 1397761.1)