ORA-00845 MEMORY_TARGET not supported on this system
看問題比較迷惑人,什麼是不支援
從oracle 11g開始引入了MEMORY_TARGET,當它的值大於/dev/shm的值時就會丟擲ORA-00845
官方解釋是:
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The size of the shared memory must be at least the greater of the MEMORY_MAX_TARGET and MEMORY_TARGET parameters for each Oracle instance on the computer. If the MEMORY_MAX_TARGET parameter or the MEMORY_TARGET parameter is set to a nonzero value, and an incorrect size is assigned to the shared memory, it results in an ORA-00845 error at startup. On Linux systems, if the operating system /dev/shm mount size is too small for the Oracle system global area (SGA) and program global area (PGA), it results in an ORA-00845 error.
看樣子如果SGA和PGA加起來比/dev/shm大也會導致ORA-00845
解決辦法:
vi /etc/fstab
tmpfs /dev/shm tmpfs defaults,size=8G 0 0
這裡的size是要根據MEMORY_TARGET或者SGA+PGA得到,一定要比MEMORY_TARGET或者SGA+PGA大才行。
mount -o remount /dev/shm生效