|
|
 |
|
The UNIX Kill command
Oracle Tips by Burleson Consulting
|
The UNIX Kill command
As we noted in Chapter 1, there are times when it is
necessary to kill all Oracle processes, or a selected set of
Oracle processes. You may want to kill all Oracle processes
when the database is “locked” and you cannot enter server
manager and gracefully stop the database.
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, the then use the ipcrm –m command to release the
RAM memory from UNIX.
3. (non_AIX) Use the ipcs –sa command to display held
semaphores and then use the ipcrm –s command to release the
held semaphores for the instance
As we noted in Chapter 1, we can create a single command to
terminate all Oracle processes associated with your hung
database instance.
root> ps -ef|grep
$ORACLE_SID| \
grep -v grep|awk '{print
$2}'|xargs -i kill -9 {}
We can then check for held memory using the ipcs –pmb
command, and remove the memory held by the database:
root> ipcs -pmb
IPC status from /dev/kmem as of Mon Sep 10 16:45:16 2001
T ID KEY MODE OWNER GROUP SEGSZ CPID LPID
Shared Memory:
m 24064 0x4cb0be18
--rw-r----- oracle Remote DBA 28975104 1836 23847
m 1 0x4e040002 --rw-rw-rw- root root 31008 572 572
m 2 0x411ca945 --rw-rw-rw- root root 8192 572 584
m 4611 0x0c6629c9 --rw-r----- root root 7216716 1346 23981
m 4 0x06347849 --rw-rw-rw- root root 77384 1346 1361
Here we see that the only RAM memory segment owned by Oracle
is ID=24064. The following command will release this memory
segment:
root> ipcrm –m 24064 |
 |
Expert Remote DBA
BC is America's oldest and largest Remote DBA Oracle support
provider. Get real Remote DBA experts, call
BC Remote DBA today. |
 |
|
|
|
|