修改資料庫參數 memory_max_target 之後重啟DB遭遇錯誤
1. ORA-00845: MEMORY_TARGET not supported on this system
SQL> ALTER SYSTEM SET memory_max_target = 1887436800 SCOPE=SPFILE;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORA-00845: MEMORY_TARGET not supported on this system
[解決方式]
從alert 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 1996488704 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 1936601088 and used is 237568 bytes. Ensure that the mount point is /dev/shm for this directory.
1. vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=96g 0 0
2. reboot os
3. startup database
2. ORA-27102: out of memory
SQL> ALTER SYSTEM SET memory_max_target ='16G' SCOPE=SPFILE;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> startup
ORA-27102: out of memory
Linux-x86_64 Error: 12: Cannot allocate memory
Additional information: 26
Additional information: 327685
Additional information: 1711276032
memory_max_target 不可超過 實體記憶體 + Swap Space。
$ free
total used free shared buffers cached
Mem: 3782888 1674632 2108256 232144 34832 914080
-/+ buffers/cache: 725720 3057168
Swap: 10239996 0 10239996
1. 把 memory_max_target 調整到適合大小,再 startup database
2. 增加實體記憶體或swap space,,再 startup database
3. 其他注意事項
(Do not)勿調整SGA_MAX_SIZE
SGA_MAX_SIZE會自動調整成和MEMORY_MAX_TARGET相同值。
If AMM is disabled.
(Do not)勿調整SGA_MAX_SIZE超過 MEMORY_MAX_TARGET
SQL> startup
ORA-00843: Parameter not taking MEMORY_MAX_TARGET into account
ORA-00849: SGA_TARGET 12884901888 cannot be set to more than MEMORY_MAX_TARGET 2013265920.
沒有留言:
張貼留言