昨天在安装oracle实例是报如下错:
3UxGTufp.png (22.43 KB, 下载次数: 166) Linux下安装Oracle是报错:ORA-3113 "end of file on communication channel" 2012-8-14 10:43 上传 在安装完成后,这个错误的出现还经常伴随着其它错误,比如说: ORA-1034 ORACLE not available 然后我尝试去启动数据库,却报如下错误: ORA-01034: Oracle not available 造成此错误的原因主要是共享内存不足,所以,接下来我们应该修改共享内存的大小,修改方法如下: 修改/etc/rc.d/rc.local文件。 在文件的前面注释的后面加入以下行: #修改内核共享内存大小; echo 134217728 > /proc/sys/kernel/shmmax; #说明:这里的值为内存的一半; #如果系统内存是256M,则值为134217728 ; #如果系统内存是512M,则值为268435456; 修改完成以后,重起机器就搞定。 [grid@localhost ~]$ sqlplus / as sysasm SQL*Plus: Release 11.2.0.3.0 Production on Tue Aug 14 10:27:15 2012 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to an idle instance. SQL> startup SQL>
ORA-27101: shared memory realm does not exist
可是在重启后启动ASM却报错了:
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
--使用crs_stat命令查看css状态
--发现AUTO_START=never
--也就是说其实css还没有设定为自动启动
--又查看了diskmon,也同样是不自动启动
NAME=ora.cssd
TYPE=ora.cssd.type
ACTION_SCRIPT=
ACTIVE_PLACEMENT=0
DESCRIPTION="Resource type for CSSD"
FAILOVER_DELAY=0
FAILURE_INTERVAL=3
FAILURE_THRESHOLD=5
HOSTING_MEMBERS=
PLACEMENT=balanced
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=600
STOP_TIMEOUT=900
UPTIME_THRESHOLD=1m
[grid@localhost ~]$ crs_stat -p ora.diskmon
TYPE=ora.diskmon.type
ACTION_SCRIPT=
ACTIVE_PLACEMENT=0
DESCRIPTION="Resource type for Diskmon"
FAILOVER_DELAY=0
FAILURE_INTERVAL=3
FAILURE_THRESHOLD=5
HOSTING_MEMBERS=
PLACEMENT=balanced
RESTART_ATTEMPTS=10
SCRIPT_TIMEOUT=60
START_TIMEOUT=60
STOP_TIMEOUT=60
UPTIME_THRESHOLD=5s
--启动过程中diskmon被一起拉起来
--启动后查询集群资源状况如下:
CRS-2679: Attempting to clean 'ora.diskmon' on 'localhost'
CRS-2681: Clean of 'ora.diskmon' on 'localhost' succeeded
CRS-2672: Attempting to start 'ora.diskmon' on 'localhost'
CRS-2676: Start of 'ora.diskmon' on 'localhost' succeeded
CRS-2676: Start of 'ora.cssd' on 'localhost' succeeded
------------------------------------------------------------
ora.DATA.dg ora....up.type OFFLINE OFFLINE
ora....ER.lsnr ora....er.type ONLINE ONLINE localhost
ora.asm ora.asm.type OFFLINE OFFLINE
ora.cssd ora.cssd.type ONLINE ONLINE localhost
ora.db11.db ora....se.type OFFLINE OFFLINE
ora.diskmon ora....on.type ONLINE ONLINE localhost
--再次手动启动asm
Fixed Size 1336036 bytes
Variable Size 258063644 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>
原理及应用:1,查看oracle的alert_sqlercn.log文件,如果出现ORA-00845错误,会有如下的内容WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 423624704 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 413573120 and used is 12288 bytes.memory_target needs larger /dev/shm这句话就是说以目前的设置/dev/shm这个设备的大小至少要有423624704 bytes,2,编辑/etc/fstab文件加入以下内容none /dev/shm devshm defaults,size=1250M 0 0其中size后指定了/dev/shm设备的大小,注意一定要大于Oracle所要求的最小大小。3,执行以下命令重新载入设备mount -o remount /dev/shm现在你就可以启动你的Oracle实例了。
下面是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 ofMEMORY_MAX_TARGETandMEMORY_TARGETfor each Oracle instance on the computer. IfMEMORY_MAX_TARGETorMEMORY_TARGETis set to a non zero value, and an incorrect size is assigned to the shared memory, it will result in anORA-00845error at startup. The number of file descriptors for each Oracle instance should be at least512*PROCESSES. Also, the limit of descriptors for each process should be at least 512. If file descriptors are not sized correctly, you will noticeORA-27123from various Oracle processes and potentiallyLinux Error EMFILE (Too many open files)errors in non-Oracle processes.
修改后再次去启动oracle数据库:
ORACLE instance started.
Fixed Size 1345352 bytes
Variable Size 247466168 bytes
Database Buffers 163577856 bytes
Redo Buffers 6094848 bytes
Database mounted.
Database opened.
SQL>
作者: 郑全 时间: 2012-8-14 21:29
顶原创.
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2