11gR2报connected to an idle instance.

情景再现:

sqlplus /nolog

connect / as sysdba;

connected to an idle instance.

 

解决办法:

[root@rhel ~]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda1             7.8G  6.6G  867M  89% /
tmpfs                 8.0G     0  8.0G   0% /dev/shm
/dev/sdb1              79G  6.7G   69G   9% /data

[oracle@rhel ~]$ rlwrap sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 3 16:24:42 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

idle> startup
ORACLE instance started.

Total System Global Area 6614106112 bytes
Fixed Size            2213896 bytes
Variable Size         3758098424 bytes
Database Buffers     2818572288 bytes
Redo Buffers           35221504 bytes
Database mounted.
Database opened.
idle> @login
sys@SUN>


运行一段时间后,然后再次登录,竟然出错
[oracle@rhel ~]$ sp

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 3 16:42:21 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27102: out of memory
Linux-x86_64 Error: 12: Cannot allocate memory
Additional information: 1
Additional information: 32768
Additional information: 8
Process ID: 0
Session ID: 0 Serial number: 0


Enter user-name: exit
Enter password:
rlwrap: Oops, segfault -  this should not have happened!
If you need a core dump, re-configure with --enable-debug and rebuild
Resetting terminal and cleaning up...

原来是/dev/shm空间已经小于分配的SGA,也就是共享内存不足
[oracle@rhel ~]$ df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda1             7.8G  6.6G  866M  89% /
tmpfs                 8.0G  3.6G  4.5G  45% /dev/shm
/dev/sdb1              79G  6.7G   69G   9% /data

更改shm为16G
[root@rhel ~]# vi /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults,size=16G        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0
# Beginning of the block added by the VMware software
.host:/                 /mnt/hgfs               vmhgfs  defaults,ttl=5     0 0
# End of the block added by the VMware software
/dev/sdb1        /data            ext3    defaults    1 2
[root@rhel ~]# mount -o remount /dev/shm
[root@rhel ~]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda1             7.8G  6.6G  866M  89% /
tmpfs                  16G  3.6G   13G  23% /dev/shm
/dev/sdb1              79G  6.7G   69G   9% /data

在次登录
[oracle@rhel ~]$ sp

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 3 16:44:05 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值