天天看點

[INS-35172] Target database memory (XXMB) exceeds the systems available shared memory ({0}MB) 解決方法

安裝Oracle 11gR2資料庫,安裝過程中報錯:

[INS-35172] Target database memory (778MB)exceeds the systems available shared memory ({0}MB).

經過測試,目前系統最大能通過的記憶體是:632M. 如下圖:

影響這個最大值,即632M是我們的tmpfs 檔案的大小。 這個問題和我之前的blog原因類似:

​​Oracle11gR2 RAC ORA-00845 MEMORY_TARGET not supported on this system 解決方法​​

​​http://www.cndba.cn/Dave/article/478​​

MOS上的文檔[ID 460506.1] 有說明。

You are tryingto use the MEMORY_TARGET feature. This feature requires the /dev/shm filesystem to be mounted for at Least <size> bytes.The /dev/shm is either notmounted or is mounted With available space less than this size.

[root@gg2 ~]# df -h /dev/shm

Filesystem            Size  Used Avail Use% Mounted on

tmpfs                 636M     0 636M   0% /dev/shm

這個檔案的大小才是真正控制我們 AMM 的大小關鍵。找到了原因就好處理了。修改tmpfs 的大小,使其大于MEMORY_TARGET的大小就可以了。 

# umount tmpfs

# mount -t tmpfs shmfs -o size=3G /dev/shm

讓以後每次重新開機OS 都自動mount,修改檔案 /etc/fstab 将tmpfs 修改成以下值:

 tmpfs            /dev/shm        tmpfs  defaults,size=3G        0 0

如果直接修改/etc/fstab,通過重新開機OS 也可以讓參數生效。

注意:這個size 的大小需要設定為整數。

[root@gg2 ~]# df -lh /dev/shm

Filesystem            Size  Used Avail Use% Mounted on

shmfs                 3.0G     0 3.0G   0% /dev/shm

修改之後就可以順利通過安裝了。