how to find the semaphore for the Database instance



Last updated on July 17th, 2015 at 06:05 pm

a) When Oracle Instance is not running:
/uXX/app/oracle/product/XX> sysresv
IPC Resources for ORACLE_SID “TEST″ :
Shared Memory
ID KEY
No shared memory segments used
Semaphores:
ID KEY
No semaphore resources used
Oracle Instance not alive for sid “TEST″
b)When Oracle Instance is running:
/uXX/app/oracle/product/XX> sysresv
IPC Resources for ORACLE_SID “TEST″ :
Shared Memory:
ID KEY
14437 0xe4efa8324dc
Semaphores:
ID KEY
1232330802 0x09d48331246
Oracle Instance alive for sid “TEST″
c) Suppose you try to start the instance and it complains
about its running due to orphan semaphore.and sysresv also determine the
instance is not active.Then following command could be used to remove the
shared memory and semaphores
/uXX/app/oracle/product/XX> sysresv -i
IPC Resources for ORACLE_SID “TEST″ :
Shared Memory
ID KEY
No shared memory segments used
Semaphores:
ID KEY
No semaphore resources used
Oracle Instance not alive for sid “TEST″
Remove ipc resources for sid “TEST″ (y/n)?y
Done removing ipc resources for sid “TEST″
Verify the resources were removed
/uXX/app/oracle/product/XX> sysresv
IPC Resources for ORACLE_SID “TEST″ :
Shared Memory
ID KEY
No shared memory segments used
Semaphores:
ID KEY
No semaphore resources used
Oracle Instance not alive for sid “TEST″
d) If you need to remove memory segments, and Oracle detects
the

instance is alive through sysresv:
% ipcrm -m
Where is the memory id shown in the sysresv
output.
If you need to remove semaphores, and Oracle detects the
instance is alive through sysresv:
% ipcrm -s
where is the semaphore id shown in the sysresv
output.

Leave a Reply