“ORA-00845: MEMORY_TARGET not supported on this system”不完全解決之道
ORA-00845: MEMORY_TARGET not supported on this system
或者在啟動資料庫的時候:
SQL> startup ORA-00845: MEMORY_TARGET not supported on this system
接著建庫中止,仔細研究後發現,造成這個問題是由於設定SGA的大小超過系統的/dev/shm的大小:
[root@12c ~]# df -k /dev/shm Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 2027740 645152 1382588 32% /dev/shm
檢視alert_orcl.log日誌,找到如下報錯:
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 1644167168 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 1415770112 and used is 660635648 bytes. Ensure that the mount point is /dev/shm for this directory. Wed Jul 31 21:04:42 2013 memory_target needs larger /dev/shm
期望大小: at least 1644167168 bytes = 1568 MB
一般來說,shm預設大小是系統記憶體的1/2大小。即系統記憶體是4G,則tmpfs就是2G。你可能會說既然期望是1568MB,2G也足夠了,這裡不能忘記還有ASM例項又會佔用一些記憶體,剩下的就小於1568m了。
方法1:調低MEMORY_TARGET記憶體
alter system set MEMORY_MAX_TARGET=1G scope=spfile;
當然如果已經無法啟動庫,也沒法操作上述命令。而且對於真實應用調低MEMORY_TARGET記憶體也不是很實用。具體方法就不示範,以方法2為主。
方法2:修改shm容量
[root@12c ~]# umount /dev/shm umount: /dev/shm: device is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) [root@12c ~]# ls /dev/shm ora_+ASM_5308430_0 ora_+ASM_5341199_18 ora_+ASM_5341199_262 ora_+ASM_5308430_1 ora_+ASM_5341199_180 ora_+ASM_5341199_263 ora_+ASM_5341199_0 ora_+ASM_5341199_181 ora_+ASM_5341199_264 ora_+ASM_5341199_1 ora_+ASM_5341199_182 ora_+ASM_5341199_265 ora_+ASM_5341199_10 ora_+ASM_5341199_183 ora_+ASM_5341199_266 .............................
發現shm也在被Grid程式正在使用,為了umount該裝載點,必須先得shutdown ASM instance
su - grid sqlplus / as sysasm shutdown immediate
再次檢視
[root@12c ~]# ls /dev/shm pulse-shm-2298131991 pulse-shm-2650250879 pulse-shm-2472803980 pulse-shm-737986347 #還有程式佔用 [root@12c ~]# fuser -m -v /dev/shm #詳細檢視那些程式正在使用 Cannot stat file /proc/2350/fd/79: No such file or directory Cannot stat file /proc/2350/fd/80: No such file or directory USER PID ACCESS COMMAND /dev/shm: oracle 2753 ....m gnome-settings- oracle 2775 ....m pulseaudio oracle 2815 ....m gnome-volume-co oracle 2836 ....m gpk-update-icon fuser -m -k /dev/shm #自動殺正在使用的程式 fuser -m -i -k /dev/shm #殺程式前會詢問
vi /etc/fstab tmpfs /dev/shm tmpfs defaults,size=4g 0 0
這時候不妨把值給的更大一點,因為還有ASM例項會需要佔用一部分。
或者也可以直接
vi /etc/fstab mount -o remount /dev/shm
但是請注意,以上方法在OL6.3中,哪怕是修改/etc/fstab,重啟機器後也還是會變成預設。實測在5.8的版本中修改/etc/fstab應該是直接生效的。
所以需要在開機後馬上執行下:mount -o remount /dev/shm
或者一勞永逸的方法
使用暴力方法,在開機的過程中remount。
[root@12c ~]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local mount -o remount /dev/shm
———————————————
也可以透過/etc/rc.d/rc.sysinit使fstab中tmpfs的修改生效
註釋如下語句
#mount -f /dev/shm >/dev/null2>&1
在rc.syinit中找到如下內容:
if [ "$READONLY" != "yes" ] ; then action $"Mounting local filesystems: " mount -a -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev else action $"Mounting local filesystems: " mount -a -n -t nonfs,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 -O no_netdev fi
方法3:強烈推薦
vim /etc/rc.d/rc.sysinit change the line: mount -f /dev/shm>/dev/null 2>&1 to mount /dev/shm>/dev/null 2>&1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29960155/viewspace-1365877/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-00845: MEMORY_TARGET not supported on this system報錯解決
- ORA-00845 MEMORY_TARGET not supported on this system報錯解決
- ORA-00845 MEMORY_TARGET not supported on this system
- ORA-00845: MEMORY_TARGET not supported on this system
- ORA-00845: MEMORY_TARGET not supported on this system 失敗的解決方案
- startup ORA-00845: MEMORY_TARGET not supported on this system
- Oracle報錯:ORA-00845: MEMORY_TARGET not supported on this systemOracle
- ORA-00845: MEMORY_TARGET not supported on this system - Linux ServersLinuxServer
- Oracle11g ORA-00845: MEMORY_TARGET not supported on this systemOracle
- 解決辦法:ORA-00845: MEMORY_TARGET not supported on thi
- ORA-00845 MEMORY_TARGET not supported
- MEMORY_TARGET not supported on this system
- Oracle 11g報錯"ORA-00845: MEMORY_TARGET not supported on this system"Oracle
- oracle 11g報錯ORA-00845: MEMORY_TARGET not supported on this systemOracle
- HugePages與AMM不相容:ORA-00845: MEMORY_TARGET not supported on this system
- Oracle11g啟動報:ORA-00845: MEMORY_TARGET not supported on this systemOracle
- MEMORY_TARGET not supported on this system for linuxLinux
- linux下/dev/shm的大小引發ORA-00845: MEMORY_TARGET not supported on this systemLinuxdev
- ORA-00845 : MEMORY_TARGET not supported on this system(調大資料庫記憶體無法啟動)大資料資料庫記憶體
- ORA-00845: MEMORY_TARGET
- ORA-00845 memory_target needs larger /dev/shmdev
- ORA-00845 解決
- 解決The given version [xx] is not supported, only version 1 to 10 is supported in this buildUI
- 解決 Lumen 中 client charset is not supportedclient
- 解決Project facet Java version 1.8 is not supported.ProjectJava
- Mac OS X is not supported with software virtualization解決方法Mac
- ORA-00845的錯誤與解決方案
- Oracle Fusion Middleware Supported System check,jdk,java .etc requirementsOracleJDKJavaUIREM
- memory_max_target/memory_target設定過大報ORA-00845錯誤
- ORACLE11G解決ORA-00845錯誤Oracle
- ORA-32773: operation not supported for smallfile tablespace USERS 解決
- 跨域問題,解決之道跨域
- pyhton3解決”tuple parameter unpacking is not supported”問題
- 解決報錯error the @annotation pointcut expression is only supported at Java 5ErrorExpressJava
- 【轉】Oracle 11gR2 RAC ORA-00845 解決方法Oracle
- 原始碼防洩密解決之道原始碼
- remount of /system failed: Read-only file system原因及解決REMAI
- 找不到system.web.script解決Web