The following opinions expressed in this post are my own and in no way connected to my employer.
When trying to start a database it errors out with below error:
ORA-01102: cannot mount database in exclusive mode
In such case follow below steps:
Bring database down as you have issued startup earlier, this will inform oracle of a proper shutdown initiated.
shut immediate;
Check if any existing oracle process exist for the instance, if they do kill those process
ps -ef|grep oracle<sid>
You can use below command to kill all process for the oracle instance in a go, before executing ensure the 'ps -ef' command gives the intended result :
kill -9 `ps -ef|grep oracle<sid>|grep -v grep|awk '{print $2}'`
Check if you find a lock file under $ORACLE_HOME/dbs location of naming convention:
lk<ORACLE_SID>
if the same exists remove it.
ls lk<$ORACLE_SID>
rm lk<$ORACLE_SID>
Now try to restart your database and the instance should come up fine.
The reason being oracle thinks the instance is already allocated memory although it is not because of the lock file.
Comments