Sunday, 6 April 2014

ORA-01102: cannot mount database in EXCLUSIVE mode

SQL> startup
ORACLE instance started.
 
Total System Global Area  835104768 bytes
Fixed Size                  2232960 bytes
Variable Size             285216128 bytes
Database Buffers          541065216 bytes
Redo Buffers                6590464 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
Database alert log might show following error.
Wed Sep 04 05:35:30 2013
ALTER DATABASE   MOUNT
sculkget: failed to lock /oranfs1/RHAP1/oracle/product/11.2/dbs/lkBRTEST1 exclusive
sculkget: lock held by PID: 64
ORA-09968: unable to lock file
Linux-x86_64 Error: 11: Resource temporarily unavailable
You might have already ensured that no other instances of this Oracle database is running on this server.
[oracle@RHAP1 ~]$ ps -ef | grep pmon
grid     26377     1  0 Sep03 ?        00:00:00 asm_pmon_+ASM
oracle   28239 26946  0 06:04 pts/0    00:00:00 grep pmon
[oracle@RHAP1 ~]$
Solution
Check for the file pointed by alert log. In my case it was $ORACLE_HOME/dbs/lkBRTEST1 i.e lk. Delete this file and starup the instance.
[oracle@RHAP1 ~]$ cd /oranfs1/RHAP1/oracle/product/11.2/dbs
[oracle@RHAP1 dbs]$ ls -ltr lkBRTEST1
-rw-r----- 1 oracle oinstall 24 Aug 26 07:07 lkBRTEST1
[oracle@RHAP1 dbs]$ rm -rf lkBRTEST1
SQL> startup
ORACLE instance started.
 
Total System Global Area  835104768 bytes
Fixed Size                  2232960 bytes
Variable Size             285216128 bytes
Database Buffers          541065216 bytes
Redo Buffers                6590464 bytes
Database mounted.
Database opened.
In some cases sgadef.dbf file under $ORACLE_HOME/dbs can also cause the issue. You can delete this file as well and try to startup the instance.
This issue is more likely to happen when ORACLE_HOME & database files resides on NFS. NFS should be configured properly to release any locks after a server or database crash.

No comments:

Post a Comment

Number of Visitors