Killing a process
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Killing a process

Hybrid View

  1. #1
    Join Date
    Jan 2001
    Posts
    642
    hi,

    I was making a bulk update, I wanted to make some more changes in my code, so I closed my session.

    When I re open the sql plus, still the privious process is running at the background.

    1) How do I know,that process is running at background.
    2) how do I know what locks are there on that process
    3) How do I release locks or kill the process manually/

    Some scripts to do these will be highly appreciated
    Badrinath

  2. #2
    Join Date
    Jan 2001
    Posts
    71
    check v$session and v$process

  3. #3
    Join Date
    Jan 2001
    Posts
    642
    Where can I get the description for each of the fields columns of the v$tables like
    V$session, v$process

    Dict table does not even give the brief description for these tables !!
    badrinath

  4. #4
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    See the descriptions for the columns of v$tables in Oracle 8i documentation under Oracle8i SQL reference.

    Unix:
    $ps -ef|grep <string> you have used for Background process.
    Ex: $ps -ef|grep <sqlldr> If you have used sqlldr for background job.
    NT:
    I guess processes window
    Database:
    V$SQLAREA ( don't remember exact view)

    I have scripts for locks identification at my desk. Drop me an e-mail as reminder I will attach and send 'em tomorrow!

    You have to kill the session thru which you initiated the job to kill the process manually. Its not going to release the locks even, depending upon the transaction status.
    Reddy,Sam

  5. #5
    Join Date
    Jan 2001
    Posts
    5
    For getting lock details, do the following
    steps.

    i)

    select * from v$session
    where sid
    in
    (select sid from v$lock
    where id1 in
    (select object_id from all_objects
    where
    object_name = <"name of the object against the query
    was fired">))

    This will give the info. about the lock.

    ii) Either u can kill the session by connecting as SYS or internal.

    iii) Otherwise u can get the process id by using the
    ps -ef | grep (for ur process) , then
    try to kill the process in the command line.

    ** Before doing that put a query in oracle between
    v$session and v$process to know about the
    magnitude of the process.
    the

  6. #6
    Join Date
    Jan 2001
    Posts
    23

    You can get the details of locking from the following tables.

    V$ACCESS
    V$LOCK
    V$LOCKED_OBJECT

    You can even get the transaction details which has performed the lock.

    You can kill the process from Oracle itself using the
    SID, SERIAL# details from v$SESSION/v$PROCESS.

    If you want to perform a OS level process termination then follow what SREDDY had adivced and terminate the process with the KILL command of the OS (UNIX), KILL -9 for a sure kill.

    Cheers,
    Nanda.


  7. #7
    Join Date
    Mar 2001
    Posts
    18

    Angry

    select sid,serial#,username
    from v$session;

    To kill a particular session pick its sid,serial#.

    Ex.

    ALTER SYSTEM KILL SESSION '8,103';

    where 8 is the sid and 103 is the serial#.

    cheers
    CHEERS

  8. #8
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Answering to the question where can you get the description of the v$tables, do the following

    on the sql prompt

    SQL> desc v$session

    would list all the columns in the V$session view. "desc" means describe.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


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