ORA-01102: cannot mount database in EXCLUSIVE mode
- SQL> conn /as sysdba
- Connected to an idle instance.
- SQL> startup
- ORACLE instance started.
- Total System Global Area 591396864 bytes
- Fixed Size 1220724 bytes
- Variable Size 167776140 bytes
- Database Buffers 415236096 bytes
- Redo Buffers 7163904 bytes
- ORA-01102: cannot mount database in EXCLUSIVE mode
- SQL> shutdown immediate
- ORA-01507: database not mounted
- ORACLE instance shut down.
第二点,如果系统是因为断电引起数据库宕机的,并且系统在接电被重启后,我们可以排除第二种可能的1、2点。接下来考虑第3点。
- [oracle@localhost dbs]$ ls sgadef*
- ls: cannot access sgadef*: No such file or directory
- [oracle@localhost dbs]$ ls lk*
- lkORCL
- [oracle@localhost dbs]$
- [oracle@localhost dbs]$ rm lkORCL
- [root@localhost dbs]# ps -ef|grep oracle
- root 2310 2358 0 16:00 pts/0 00:00:00 su - oracle
- oracle 2311 2310 0 16:00 pts/0 00:00:00 -bash
- root 2427 2403 0 10:47 pts/1 00:00:00 su - oracle
- ……
1.如果是HA系统,检查其他节点是否已经启动实例;
2.检查Oracle进程是否存在,如果存在则杀掉进程;3.检查信号量是否存在,如果存在,则清除信号量;
4.检查共享内存段是否存在,如果存在,则清除共享内存段;
5.检查锁内存文件lk<sid>和sgadef<sid>.dbf是否存在,如果存在,则删除。
ORA-00205: error in identifying control file, check alert log for more info错误处理办法。
再次启动时又遇到下面的错误,不过别担心,继续后面的操作就搞定
SQL> startup mount
ORACLE instance started.
Total System Global Area 608174080 bytes
Fixed Size 1220844 bytes
Variable Size 176164628 bytes
Database Buffers 427819008 bytes
Redo Buffers 2969600 bytes
ORA-00205: error in identifying control file, check alert log for more info
查看共享内存段
[root@simply bdump]# ipcs -map
------ Shared Memory Creator/Last-op --------
shmid owner cpid lpid
786444 root 6490 6438
819213 root 6549 6438
1409040 oracle 31502 16728
根据ID号清楚共享内存段
ipcrm –m 1409040
我这里操作是没有成功的,不过执行了下面的操作就ok了!
查看信号量
[root@simply bdump]# ipcs -s
key semid owner perms nsems
0x17ff6454 360448 oracle 640 154
清除oracle的信号量
[root@simply bdump]# ipcrm -s 360448
再次查询确认
[root@simply bdump]# ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
再查询共享内存段也ok了!
[root@simply bdump]# ipcs -m(这里我看到一堆oracle进程,不过没管,再次重启OK了。)
如果是Oracle进程没有关闭,
$kill -9 <PID>