oracle11g數據庫在執行dbca或者調整sga後重啓oracle的時候可能會出現ORA-00845 MEMORY_TARGET not supported on this system 錯誤。
究其緣由就是Linux系統的shm的大小比SGA設置的小,形成的,距離來講,SGA設置4G,而shm可能只有1Gsql
網上提供兩種解決辦法:
0一、調整sga的大小,這個明顯不是咱們所但願的
0二、調整shm的大小,這樣相對簡單,具體操做以下
vi /etc/fstab
修改以下行的設置
tmpfs /dev/shm tmpfs defaults 0 0
改爲
tmpfs /dev/shm tmpfs defaults,size=6G 0 0
保存退出
從新mount下shm使其生效
mount -o remount /dev/shm
經過df能夠查看下,沒有問題就能夠繼續安裝數據庫或者啓動數據庫了!數據庫
說明:服務器上有兩個不一樣數據庫實例,啓動一個實例的時候沒問題。在啓動第二個INSTANCE的時候報ORA-00845錯誤。該測試服務器僅8G內存。 tmpfs 默認是4G 4.0G 1.6G 2.4G 40% /dev/shm. 兩個實例的使用內存應該超過了4G,因此安裝網上這篇文章進行修改tmpfs,問題解決了。 可是新問題tmpfs 大小的限制如何肯定呢?觀察一下內存使用在說吧服務器
[oracle@BJRMANTS ~]$ su - root
Password:
[root@BJRMANTS ~]# vi /etc/fstab
[root@BJRMANTS ~]# df -g
df: invalid option -- 'g'
Try `df --help' for more information.
[root@BJRMANTS ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 20G 5.8G 13G 31% /
tmpfs 4.0G 1.6G 2.4G 40% /dev/shm
/dev/sda1 485M 51M 409M 12% /boot
/dev/sda6 197G 160G 28G 86% /orabak
/dev/sda8 20G 6.2G 13G 34% /oracle
/dev/sda5 690G 549G 106G 84% /oradata
/dev/sda7 187G 75G 104G 42% /oralog
[root@BJRMANTS ~]# mount -o remount /dev/shm
[root@BJRMANTS ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 20G 5.8G 13G 31% /
tmpfs 6.0G 1.6G 4.5G 26% /dev/shm
/dev/sda1 485M 51M 409M 12% /boot
/dev/sda6 197G 160G 28G 86% /orabak
/dev/sda8 20G 6.2G 13G 34% /oracle
/dev/sda5 690G 549G 106G 84% /oradata
/dev/sda7 187G 75G 104G 42% /oralog
[root@BJRMANTS ~]#oracle
[oracle@BJRMANTS ~]$ export ORACLE_SID=oelncbi
[oracle@BJRMANTS ~]$ sqlplus / as sysdba測試
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 5 10:48:51 2012this
Copyright (c) 1982, 2011, Oracle. All rights reserved.orm
Connected to an idle instance.內存
SQL> startup;
ORA-00845: MEMORY_TARGET not supported on this system
SQL> exit
Disconnected
[oracle@BJRMANTS ~]$ export ORACLE_SID=oeldzdz
[oracle@BJRMANTS ~]$ sqlplus / as sysdbarem
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 5 10:49:33 2012it
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown abort;
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@BJRMANTS ~]$ export ORACLE_SID=oelncbi
[oracle@BJRMANTS ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 5 10:49:51 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 814227456 bytes
Fixed Size 2232760 bytes
Variable Size 452988488 bytes
Database Buffers 352321536 bytes
Redo Buffers 6684672 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@BJRMANTS ~]$ export ORACLE_SID=oeldzdz
[oracle@BJRMANTS ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 5 10:54:15 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 2805977088 bytes Fixed Size 2231672 bytes Variable Size 603980424 bytes Database Buffers 2181038080 bytes Redo Buffers 18726912 bytes Database mounted. Database opened. SQL>