Wednesday, February 29, 2012

ORA-09968: unable to lock file

Sometimes when you try to startup the database it stops with a message is written in the database alert logfile as follow:


CJQ0 started with pid=8, OS id=21321
MMON started with pid=11, OS id=21325
MMNL started with pid=12, OS id=21329
Wed Feb 29 12:22:45 2012
ALTER DATABASE MOUNT
Wed Feb 29 12:22:45 2012
sculkget: failed to lock
/u01/app/oracle/product/10.2.0/dbs/lkprod exclusive
sculkget: lock held by PID: 4830
Wed Feb 29 12:22:45 2012
ORA-09968: unable to lock file
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 4925
Wed Feb 29 12:22:45 2012
ORA-1102 signalled during: ALTER DATABASE MOUNT...
Wed Feb 29 12:23:30 2012
alter database open
Wed Feb 29 12:23:30 2012
ORA-1507 signalled during: alter database open...
Wed Feb 29 12:24:10 2012
Shutting down instance (abort)


The Cause:
This error is caused by presence of the lk file in $ORACLE_HOME/dbs , this file is an instance lock file Oracle uses this mechanism to prevent staring of second instance. Normally left due to instance crash i.e not clean shutdown.

The Solution
1. Remove or rename the file and then try to restart the instance.
2. Sometimes, even after the file is deleted, some shadow processes may have open file handle on this file. In this case, we’ll have to kill the process(es) specific to this instance.

No comments: