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: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: Tue, 19 May 1998 13:19:53 GMT
Message-ID: <35618434.24339355@www.sigov.si>


On 19 May 1998 07:11:42 GMT, elufker_at_swcp.com (Ed Lufker) wrote:

>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?

Join your lock-identifying script with v$process on column v$process.pid and display column v$process.spid.

For example, you can modify the utllockt.sql script like this:

Original code:
create table dba_locks_temp as select * from dba_locks;

Modified code:
CREATE TABLE dba_lock_temp AS
  SELECT dba_locks.*, v$process.spid FROM dba_locks l, v$process p   WHERE l.session_id = p.spid;

Now in the dba_lock_temp you'll all the oracle's sessions involved in locks as well as their correcponding OS PIDs. Modify the rest of the utllockt.sql script to display those OS PIDs.

>thanks in advance for any help
>eddie lufker

Regards,


Jurij Modic                             Republic of Slovenia
jurij.modic_at_mf.sigov.mail.si		Ministry of Finance
============================================================
The above opinions are mine and do not represent any official standpoints of my employer Received on Tue May 19 1998 - 08:19:53 CDT

Original text of this message

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