Removing Semaphore and Memory for a crashed Oracle Instance
Posted by decipherinfosys on March 20, 2007
Sometimes we run into issue where database has not released its shared memory and semaphore because of abrupt shutdown or particular instance crashed. This becomes more critical when there are multiple instances running on the same machine. Unix provides ipcs command to see the semaphores and shared memory segments used by Oracle. Normally when oracle is shutdown, semaphore and shared memory segments are released. To check run following command from $ prompt on the unix box.
$ipcs | grep oracle
If instance is up and running or instance has gone down but memory and semaphores are not released you will see some entries there. It will have two segments. Shared memory (denoted by m) and Semaphores (denoted by s). If you are running single instance, it is very easy to release the semaphore and shard memory using following command.
$ipcrm -m id (id is the id displayed for memory in ipcs under memory section)
$ipcrm -s id (id is the id displayed for semaphore in ipcs under semaphore section)
You have to be extra careful when doing this. This is to be done only when instance is not up but memory and/or semaphore are not released. So please make sure that none of the oracle process is running at this time (which should be the case).
When there are multiple instances running on the same database server, it becomes more crucial to identify which shared memory and semaphore set needs to be killed. Here is the link to an article which explains this scenario in great detail.
Sorry, the comment form is closed at this time.