Wednesday, July 8, 2009

ipcrs ipcrm shmid semid

When you are forced to terminate Oracle on a UNIX server, you must perform the following steps:

1)Kill all Oracle processes associated with the ORACLE_SID

2)Use the ipcs –pmb command to identify all held RAM memory segments.

3)ipcs -a gives the following information
a)------ Shared Memory Segments --------
b)------ Semaphore Arrays --------

4)ipcrm -m shmid removes the shared memory segments.

5)ipcrm -s semid removes the semaphores

6)we can create a single command to terminate all Oracle processes associated with your hung database instance.
root> ps -efgrep $ORACLE_SID \grep -v grepawk '{print $2}'xargs -i kill -9 {}