Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: locks
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