tanggang1740 发表于 2018-9-24 11:42:16

oracle11g tmpfs参数设置

  Oracle 11g的Linux版本在修改了MEMORY_TARGET或者SGA_TARGET后启动可能会报错:
  SQL> shutdown immediate
  Database closed.
  Database dismounted.
  ORACLE instance shut down.
  SQL> startup
  ORA-00845: MEMORY_TARGET not supported on this system
  这个问题是由于设置SGA的大小超过了操作系统/dev/shm的大小:
  # df -k /dev/shm
  Filesystem 1K-blocks Used Available Use% Mounted on
  tmpfs 4089416 0 4089416 0% /dev/shm

  Oracle在metalink的文档:Doc>  1.查看tmpfs参数
  df -hl
  2.设置参数

  # umount tmpfs # mount -t tmpfs shmfs -o>  3.修改“/etc/fstab”

  tmpfs /dev/shm tmpfs>  Oracle6.1重启后设置回失效,还需如下设置
  4.注释如下语句
  #mount -f /dev/shm >/dev/null2>&1
  5.在rc.sysinit 中找到如下内容:
  在rc.sysinit 中找到如下内容:
# Mount all other filesystems (except forNFS and /proc, which is already  
# mounted). Contrary to standard usage,
  
# filesystems are NOT unmounted in singleuser mode.
  
if [ "$READONLY" !="yes" ] ; then
  
action $"Mounting local filesystems: " mount -a -tnonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
  
else
  
action $"Mounting local filesystems: " mount -a -n -tnonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
  
fi
  
在如下部分里添加tmpfs 这个类型进去:
  
if [ "$READONLY" !="yes" ] ; then
  
action $"Mounting local filesystems: " mount -a -t tmpfs,nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
  
else
  
action $"Mounting local filesystems: " mount -a -n -t tmpfs,nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -Ono_netdev
  
fi
  然后重启OS:
  # df -lh
  Filesystem            SizeUsed Avail Use% Mounted on
  /dev/sda3            14G   11G 2.4G83% /
  tmpfs               3.0G   88K 3.0G   1% /dev/shm
  /dev/sda1             194M   46M 139M25% /boot


页: [1]
查看完整版本: oracle11g tmpfs参数设置