Friday, May 22, 2009

ORA-01102: cannot mount database in exclusive mode

After checking in $ORACLE_HOME/dbs I found that it contains lk file, which is used for locking shared memory.I deleted this file lkdev and tried starting my database again.

But to my surprise it's now giving me following error
ORA-00205:error in identifying control file, check alert log for more info
I checked the Alert Log file which gave me the hint to correct the issue

It means the issue is coming due to one of the following

1. Before I started the database, there were some Oracle processes present in teh system and i need to get rid of them

we can use the following to correct this

$ps -ef| grep ora_

this will give me the list of processes which i can kill using OS command , passing pid as argument

$kill -9 631

or we can use the following command to kill all the oracle processes on the system " but make sure there are no other instances" as it will kill all oracle processes

$ ps -fu oraim | grep ora_ | awk '{print "kill -9 " $2}' | ksh

where oraim is my oracle database owner.

2.Existence od shared Memeory Segments or Semaphores in the Operating System, Although Oracle Instance is already down

we can easily find that out and remove them too usign following comands

$ipcs -b -- This is to find Shared Memory Segments and Semaphores

Remove Shared Memeory Segments

$ipcrm -m

Remove Semaphore

$ipcrm -s
Once this is done , I tried to start the database once again and this time it started without any issues.

Cheers
Aashish

No comments:

Post a Comment