Oracle啟動提示ORA-00845:記憶體錯誤的解決辦法

來源:互聯網
上載者:User

今天把虛擬機器的記憶體改小了一點,然後啟動資料的時候就出現如下錯誤:

SQL> startup

ORA-00845: MEMORY_TARGET not supported on this system

我猜想應該是系統記憶體和sga衝突的問題,後來到網上查了一下,果然如此:

來自Oracle的官方解析是:

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 should be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. If MEMORY_MAX_TARGET or MEMORY_TARGET is set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in an ORA-00845 error at startup.

也就是由於設定SGA的大小超過了作業系統/dev/shm的大小:

解決這個問題只有兩個方法,一種是修改初始化參數,使得初始化參數中SGA的設定小於/dev/shm的大小,另一種方法就是調整/dev/shm的大小。

一.修改/dev/shm的大小

root 登入

  1. #vi /etc/fstab  
  2. tmpfs                   /dev/shm                tmpfs   defaults,size=320M        0 0 

將上面的size改成超過sga的大小。然後重啟或者重新掛載

#umount /dev/shm

#mount /dev/shm

二.修改sga的大小

alter system set sga_max_size=**** scope=spfile; 

然後重新啟動資料庫。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.