ora-01102问题的解决

ora-01102问题的解决

2012年10月5号周五,某网友测试数据库不能正式打开,提示ora-01102错误

SQL> startup
ORACLE instance started.
Total System Global Area<wbr> 252776884 bytes<br> Fixed Size<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 450996 bytes<br> Variable Size<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 218103808 bytes<br> Database Buffers<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 33554432 bytes<br> Redo Buffers<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> 667648 bytes<br> ORA-01102: cannot mount database in EXCLUSIVE mode</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>

SQL> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
SQL> exit
经检查发现用于锁内存的文件 lk文件没有被删除,删除后,数据库成功open
另:
出现1102错误可能有以下几种可能:
一、在HA系统中,已经有 其他节点启动了实例,将双机共享的资源(如磁盘阵列上的裸设备)占用了;
二、说明Oracle被异常关闭时,有资源没有被释放,一般有以下几种可能,
1、 Oracle的共享内存段或信号量没有被释放;
2、 Oracle的后台进程(如SMON、PMON、DBWn等)没有被关闭;
3、 用于锁内存的文件lk和sgadef.dbf文件没有被删除。
如果怀疑是共享内存没有被释放,可以用以下命令查看:
[oracle@ ~]$ ipcs - s
------ Shared Memory Segments --------
key<wbr><wbr><wbr><wbr><wbr><wbr><wbr> shmid<wbr><wbr><wbr><wbr><wbr> owner<wbr><wbr><wbr><wbr><wbr> perms<wbr><wbr><wbr><wbr><wbr> bytes<wbr><wbr><wbr><wbr><wbr> nattch<wbr><wbr><wbr><wbr> status<br> 0x00000000 0<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 4194304<wbr><wbr><wbr> 17<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><br> 0x00000000 32769<wbr><wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 33554432<wbr><wbr> 17<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><br> 0x00000000 65538<wbr><wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 33554432<wbr><wbr> 17<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><br> 0x00000000 98307<wbr><wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 33554432<wbr><wbr> 17<wbr><wbr><wbr><wbr><wbr><wbr><wbr><wbr><br> 0x00000000 131076<wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 33554432<wbr><wbr> 17</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
0xd0dccdb8 425987<wbr><wbr><wbr><wbr> oracle10g 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 154<wbr><wbr><wbr><wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
然后它ID号清除共享内存段:
$ ipcrm –m 425987
<wbr></wbr>
对于信号量,可以用以下命令查看:
------ Semaphore Arrays --------
key<wbr><wbr><wbr><wbr><wbr><wbr><wbr> semid<wbr><wbr><wbr><wbr><wbr> owner<wbr><wbr><wbr><wbr><wbr> perms<wbr><wbr><wbr><wbr><wbr> nsems<br> 0x1466c384 98304<wbr><wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 162<br> 0x1466c385 131073<wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 162<br> 0x1466c386 163842<wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 162<br> 0xd0dccdb8 425987<wbr><wbr><wbr><wbr> oracle10g 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 154<br> 0xebf842f8 950276<wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 162<br> 0xebf842f9 983045<wbr><wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 162<br> 0xebf842fa 1015814<wbr><wbr><wbr> oracle<wbr><wbr><wbr> 640<wbr><wbr><wbr><wbr><wbr><wbr><wbr> 162<br></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr>
根据信号量ID,用以下命令清除信号量:
$ ipcrm -s 425987<wbr></wbr>
如果是Oracle进程没有关闭,用以下命令查出存在的oracle进程:
ps -ef|grep ora
然后 kill -9
<wbr></wbr>
当发生1102错误时,可以按照以下流程检查、排错:
1.如果是HA系统,检查其他节点是否已经启动实例;
2.检查Oracle进程是否存在,如果存在则杀掉进程;
3.检查信号量是否存在,如果存在,则清除信号量;
4.检查共享内存段是否存在,如果存在,则清除共享内存段;
5.检查锁内存文件lk和sgadef.dbf是否存在,如果存在,则删除。

<wbr></wbr>

你可能感兴趣的:(ora)