Kill command under UNIX - forcibly termination Oracle

zhaozj2021-02-16  97

When it is forced to terminate Oracle on UNIX (such as Oracle suspended without response), the following steps must be performed.

1. Kill all and Oracle-related processes

2. Use the ipcs -pmbs command to determine all the RAM memory that is occupied, then use the ipCRM -M command to release RAM memory from UNIX

3. Use the ipcs -sa command to display the synchronization semaphore, then use the ipCRM -S command to release the synchronization signal amount for all instances.

example:

PS-EF | GREP $ ORACLE_SID | GREP -V GREP | AWK '{Print $ 2}' | xargs -i kill -9 {}

Use IPCS -PMB to view the occupied memory, and clear the memory occupied by the database

IPCS -PMB

................................................ ....

Shared memory

M 24064 OXC0BE184 --RW-r ----- Oracle DBA 28975104 1836 23847

M 4611 OXC0B9832 --RW-R ----- root root 32975104 2836 16347

............

It can be seen that the only RAM memory segment of Oracle is 24064. Use the following command to release memory

IPCRM -M 24064

note

There are many times the UNIX process is difficult to kill, or even using the kill -9 command can also kill. In this case, special tricks will force the UNIX task to terminate. If the process uses the PS command to continuously display, even It is possible to consider the following 诀窍:

Kill the process of the hard-processed process through the pipe transfer NULL device (/ dev / null) to Tyyname.

root> CAT / dev / null> / dev / ttyname kill -9 pid #

转载请注明原文地址:https://www.9cbs.com/read-15481.html

New Post(0)