Unix: kill -9 oracle_pid_client_process
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Unix: kill -9 oracle_pid_client_process

  1. #1
    Join Date
    Jun 2001
    Location
    Czech Republic
    Posts
    2

    Question

    Hi Everyone,
    1) I am interested in what happens when I run Unix command
    kill -9 oracle_pid_client_proces when this process doesn't
    enforce transactions for more than 1 hour...
    Does Oracle catch the signal SIGKILL and run ROLLBACK
    for this session and run ALTER SYSTEM KILL SESSION ...
    before kill -9 oracle_pid_client_proces or the session
    dies ?
    2) What happens when I run ALTER SYSTEM KILL SESSION ...
    at first and then kill -9 oracle_pid_client_proces ?

    Thanks a lot



  2. #2
    Join Date
    Aug 2000
    Location
    Sao Paulo
    Posts
    114

    Smile Try this scripts and explanation

    */ first profile of the user must be configured so that the same he is only active per 10 minutes
    (amount of time that you like) before must the time that the unix leads to kill a process internally
    through of unix parameter keepalive_interval. to reduce the open assembly time of kill of the user must
    get excited parameter tcp_keepalive_interval in the unix (sun) */

    ndd -get /dev/tcp tcp_keepalive_interval (show the time , default = 72000000 = 2 hours)

    ndd -set /dev/tcp tcp_keepalive_interval 10000 (= 10 secunds)

    /* after 10 minutes oracle modifies the status of the user who this inactive a more than 10 minutes for sniped.
    we must now kill the user that they are with the status sniped. to commit suicide an user with status immediately
    sniped in the unix
    */


    set echo off
    set heading off
    set feed off
    set term off
    set linesize 300
    set pagesize 0

    col sid format 99999
    col serial# format 99999
    col osuser format a15
    col username format a15
    col spid format 9999999

    spool /oracle8/killnow.sql
    select 'alter system kill session ' || '''' || a.sid || ',' || a.serial# || '''' || ';'
    from v$session a, v$process b
    where a.paddr=b.addr
    and a.username is not null
    and status='SNIPED'
    order by 1;

    spool off

    spool /oracle8/kill.sh
    select 'kill -9 ' || b.spid
    from v$session a, v$process b
    where a.paddr=b.addr
    and a.username is not null
    and status='SNIPED'
    order by 1;
    spool off

    @/oracle8/killnow.sql
    !chmod 777 /dir_name/sql/kill.sh
    !/dir_name/sql/kill.sh
    !rm /dir_name/sql/kill.sh
    !rm /dir_name/sql/killnow.sql
    exit

    /* later we must below create a file with the command string so that it is verified to
    each 10 minutes for crontab of the unix to create one arq with this string of command inside
    sqlplus user_name/password @kill_sniped.sql
    execute crontab every xx minutes.
    */

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width