Steps for a Clean Startup after an Instance Crash

 Steps for a Clean Startup after an Instance Crash

Sometimes the instance will not start if the previous shutdown was not complete (leaving some shared memory segments or processes). In such cases you can retry a fresh startup after cleaning up the old shared memory segments / semaphores:


a. check if the background processes are running
    $ ps -ef | grep $ORACLE_SID

b. If background processes are running remove the background processes:
    $ kill -9  <pid> 
    
c. Check if the shared memory and semaphore are running for your SID:
    $ ipcs –a    
    
    
d. If shared memory and semaphore are in use then remove the shared memory and semaphore:
    $ ipcrm -m  <####>-- for shared memory    
    $ ipcrm -s  <####> -- for semaphore
    
e. Change directory to the "oracle_home/dbs":
    $ cd $ORACLE_HOME/dbs
    
f. Check for the file "lk" and "sgadef.dbf".

g. If files are there, then remove the "lk<SID>" and "sgadef<sid>.dbf" files:
    $ rm lk<SID> sgadef<sid>.dbf


    A server reboot will do this cleanup except for the lk<SID> files.

Post a Comment

And that's all there is to it!

If anyone has any other questions or requests for future How To posts, you can either ask them in the comments or email me. Please don't feel shy at all!

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

Previous Post Next Post