【遇到问题】ORA-27102 ORA-01034
生活随笔
收集整理的這篇文章主要介紹了
【遇到问题】ORA-27102 ORA-01034
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
軟件安裝完接著開始建庫,不幸的是開始報錯,內(nèi)容如下: ORA-27102: out of memory ?ORA-01034: ORACLE not available<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> 一.查下系統(tǒng)版本 oracle@linux:/u01/app/oracle/admin/orcl/bdump> uname -a Linux linux 2.6.5-7.308-bigsmp #1 SMP Mon Dec 10 11:36:40 UTC 2007 i686 i686 i386 GNU/Linux 本系統(tǒng)為32位 二.查看內(nèi)存信息 oracle@linux:/u01/app/oracle/admin/orcl/bdump> cat /proc/meminfo MemTotal:????? 8302360 kB MemFree:?????? 3788908 kB Buffers:??????? 138968 kB Cached:??????? 4003872 kB SwapCached:????????? 0 kB
The following runInstaller syntax can be used to cap the SGA during installation to avoid this error. ./runInstaller n_maxMemoryInMB=4000
This will cap the SGA at 4GB.? The out of memory error should not be encountered again.? The above syntax can be run with a smaller value as well depending on your environment.? However, the recommendation would be to not specify anything less than 2GB as this could lead to memory errors post-install.
?
oracle@linux:/u01/app/oracle/admin/orcl/bdump> free -m ???????????? total?????? used?????? free???? shared??? buffers???? cached Mem:????????? 8107?????? 4407?????? 3700????????? 0??????? 135?????? 3910 -/+ buffers/cache:??????? 361?????? 7745 Swap:???????? 4102????????? 0?????? 4102?
本系統(tǒng)物理內(nèi)存為8G ,swap為4G。這里說明一下,一般oracle對于硬件的要求為: 1.?????? 至少有1024MB的物理內(nèi)存 2.?????? Swap的大小設置1024 MB 到 2048 MB 1.5 倍 RAM,2049 MB 到 8192 MB 等于 RAM大于 8192 MB 0.75 倍 RAM ,oracle10g以后oracle也是安裝這個公式來chenck. 3.?????? 在 /tmp 目錄中至少有400 MB空閑磁盤空間 4.1.5 GB 到 3.5 GB 的磁盤空間用于安裝 Oracle 數(shù)據(jù)庫軟件 因此我的系統(tǒng)系統(tǒng)工程師swap設置少,因此在我安裝oracle10G check的時候提示swap空間不夠。 ?三.查metalink:?
Cause There? is not enough SHM (max-shm-memory) for the SES install. SES will try to allocate 40% of the installed RAM for SGA.? For example, if the installed RAM is 60GB.? SES will attempt to allocated approximately 24GB for SGA.? If it is not available, you will receive the out of memory error. SolutionThe following runInstaller syntax can be used to cap the SGA during installation to avoid this error. ./runInstaller n_maxMemoryInMB=4000
This will cap the SGA at 4GB.? The out of memory error should not be encountered again.? The above syntax can be run with a smaller value as well depending on your environment.? However, the recommendation would be to not specify anything less than 2GB as this could lead to memory errors post-install.
?
查看/shm大小: linux:~ # df -h Filesystem??????????? Size? Used Avail Use% Mounted on /dev/sda3????????????? 99G? 2.8G?? 91G?? 3% / tmpfs???????????????? 4.0G? 8.0K? 4.0G?? 1% /dev/shm /dev/sda1??????????? 1012M?? 39M? 922M?? 5% /boot /dev/sda5???????????? 299G? 3.6G? 280G?? 2% /u01 建庫時我的sga選為typcial模式自動分配oracle內(nèi)存區(qū)大小,oracle會默認將sga大小設為物理內(nèi)存的40%,8G*40%=2048M ,sga+pga=28480M ,而我的shm=4G,所以不存在SHM is not enough 的情況。 又查另一篇article,如下: Applies to: Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 11.1.0.7 - Release: 9.2 to 11.1 Linux x86 ***Checked for relevance on 16-Nov-2010*** Symptoms While creating a database using the Database Configuration Assistant (DBCA) or manually, the following error can occur: ??? ORA-27102: out of memory Cause For 32 bit systems running the smp kernel, we cannot have an SGA > 1.7 GB directly. This is because of limitation of 32 bit systems of not being able to address memory > 4GB directly by a user process. If SGA is kept higher than 1.7 GB, it will results in ORA-27102 errors. While invoking DBCA to create a starter database, by default it takes 40% of memory for SGA. Hence the size can accidentally exceed 1.7 GB Solution The workaround is to create a new database and specify the size of SGA approximate to be 1.5 to 1.7 GB. 由此可見,32位系統(tǒng)最大支持4G內(nèi)存,所以32位的系統(tǒng)不可以直接將sga設為大于1.7G,將sga調(diào)小即可。?
四.名詞解釋: SHM,/dev/shm is nothing but implementation of traditional shared memory concept. It is an efficient means of passing data between programs. One program will create a memory portion, which other processes (if permitted) can access. This will result into speeding up things on Linux. shm / shmfs is also known as tmpfs, which is a common name for a temporary file storage facility on many Unix-like operating systems. It is intended to appear as a mounted file system, but one which uses virtual memory instead of a persistent storage device. If you type mount command you will see /dev/shm as a tempfs file system. Therefore, it is a file system, which keeps all files in virtual memory. Everything in tmpfs is temporary in the sense that no files will be created on your hard drive. If you unmount a tmpfs instance, everything stored therein is lost. By default almost all Linux distros configured to use /dev/shm. 即shm是一塊高速緩存區(qū),通常掛在目錄tmpfs,即將內(nèi)存映射在此目錄下。Shm默認為物理內(nèi)存的一半,可以將此看做為進入系統(tǒng)內(nèi)存的入口設備,通過這個設備往內(nèi)存中讀寫數(shù)據(jù),加快頻繁讀寫文件的I/O。Oracle的內(nèi)存分配都是在shm中進行,所以如果shm大小小于sga的大小那么就有問題。 Swap:這是系統(tǒng)的交換內(nèi)存,當系統(tǒng)物理內(nèi)存不夠時將會充當內(nèi)存使用, 因此可以理解為當/dev/shm空間不夠時可以占用swap的空間,如果用到Swap時,系統(tǒng)的性能就有可能很低了。 DBA不懂系統(tǒng)是不行滴~~~~~~~轉(zhuǎn)載于:https://blog.51cto.com/kankanhoney/600126
總結(jié)
以上是生活随笔為你收集整理的【遇到问题】ORA-27102 ORA-01034的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 利用金山快盘云服务搭建自己的SVN服务器
- 下一篇: 在cshtml中显示FCKeditor编