Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: locks

Re: locks

From: Neil Chandler <oracle_at_tchp2.tcamuk.stratus.com>
Date: 19 May 1998 12:07:32 GMT
Message-ID: <slrn6m2tcu.cda.oracle@tchp2.tcamuk.stratus.com>


In article <6jrbbe$mon$1_at_sloth.swcp.com>, Ed Lufker wrote:

Eddie,

Do not kill the Unix process. You are better off killing the session within Oracle:

select sid,serial# from v$session where sid = [the sid holding the lock]

SID     SERIAL#
---     -------
 11         203

alter system kill session '11,203'';

This will then be marked as 'KILLED' and will rollback. All locks should be released fairly quickly if not immediately.

To get the Unix PID, look in v$process. This can be joined to v$session as follows:

select ...... from v$session, v$process where v$process.addr = v$session.paddr
......

regs

Neil Chandler

>Hi:
>
>
> Does anyone have a script to get the os pid of a process that is
>holding a lock? I've found utllockt.sql which is great for finding the
>locks, but I was wanting to kill the unix process that was holding the
>lock and I didn't have any facility to get the os pid?
>
>thanks in advance for any help
>eddie lufker
>
>
Received on Tue May 19 1998 - 07:07:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US