Wednesday, August 25, 2021

 ORA-01102: cannot mount database in EXCLUSIVE mode (During database startup)


SQL> startup

ORACLE instance started.

Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 79693392 bytes
Database Buffers 201326592 bytes
Redo Buffers 2973696 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode

Cause: There are some client shadow processes hanging. Although the lk<SID> file is deleted the hanging processes still have a lock on the open  file handle. This prevents the database to startup although a new lk<SID> file can be created successfully.

 

An oracle process (background or shadow process) that exists while the instance is not started (crashed or not cleanly stopped) can have a lock on a file while this file is actually removed from the system. This is because on UNIX there is still a lock on the open file handle.

 

Solution:

Verify if there are existing oracle processes for the database:

 

[oracle@servername ~]$  ps -ef | grep $ORACLE_SID

oracle    1525     1  0 10:13 ?        00:00:03 ora_j000_GRIDDB3

oracle    1527     1  0 10:13 ?        00:00:01 ora_j001_GRIDDB3

oracle    4198     1  0 10:27 ?        00:00:00 oracleGRIDDB3 (LOCAL=NO)

oracle    7479     1  0 May30 ?        00:00:00 oracleGRIDDB3 (LOCAL=NO)

.

.


Kill the hanging processes to release the lock on the file handle:

 

[oracle@servername ~]$ kill -9 `ps -ef | grep $ORACLE_SID | grep -v grep | awk '{print $2}'`

eg: kill -9 `ps -ef | grep testcdb | grep -v grep | awk '{print $2}'`

 

[oracle@sservername ~]$  ps -ef | grep $ORACLE_SID

oracle   11990 11927  0 10:50 pts/1    00:00:00 grep GRIDDB3

No comments:

Post a Comment

  RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...