coba ini

 

SELECT oracle_username USERNAME, owner OBJECT_OWNER,

object_name, object_type, s.osuser,

DECODE(l.block,

  0, 'Not Blocking',

  1, 'Blocking',

  2, 'Global') STATUS,

  DECODE(v.locked_mode,

    0, 'None',

    1, 'Null',

    2, 'Row-S (SS)',

    3, 'Row-X (SX)',

    4, 'Share',

    5, 'S/Row-X (SSX)',

    6, 'Exclusive', TO_CHAR(lmode)

  ) MODE_HELD

FROM gv$locked_object v, dba_objects d,

gv$lock l, gv$session s

WHERE v.object_id = d.object_id

AND (v.object_id = l.id1)

and v.session_id = s.sid

ORDER BY oracle_username, session_id;

 

 

 

 

bisa juga ini

 

SELECT DECODE(request,0,'Holder: ','Waiter:') || sid sess, id1, id2,
lmode, request, type

FROM gv$lock

WHERE (id1, id2, type) IN (

  SELECT id1, id2, type FROM gv$lock WHERE request>0)

ORDER BY id1, request;

 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of bapux oke
Sent: Friday, May 11, 2007 3:02 PM
To: [email protected]
Subject: Re: [indo-oracle] Cara mengetahui row mana yang di lock

 

Halo Pak Wadi
Saya mau mencoba jawab pertanyaan bapak, biasanya di tempat saya pake
program Knowledge Xpert yang Oracle Administration, terus connect as
system,
nah bapak coba cari topik listnya Active Analysis-Show locks Held by
User, terus jalankan Run Analysis System, nanti kelihatan user id yang
lock. Biasanya software ini nempel di toad dari quest software. 
Semoga membantu

Hendra

Wadi Achmed <[EMAIL PROTECTED] <mailto:wadiachmed%40gmail.com> >
wrote: Hello All,

Mau tanya dong, gimana caranya mengetahu row mana dari suatu table
yang sedang dilock sama salah satu user/session?

Misalnya salah satu user ngelock dengan command:
select *
from table1
where rowid = .....
for update nowait;

Thanks sebelumnya.

-- 
Best regards,
Wadi mailto:[EMAIL PROTECTED] <mailto:wadiachmed%40gmail.com> 





---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.

[Non-text portions of this message have been removed]

 



The information contained in this email is or may be confidential, legally 
privileged, and proprietary in nature or otherwise protected by law from 
disclosure and is intended solely for the use of the addressee. If you are not 
the intended recipient, you are hereby notified that any disclosure, 
dissemination, distribution, copying or use of any part of this mail is 
strictly prohibited and unlawful. If you received this email in error, please 
immediately notify the sender or our email administrator at [EMAIL PROTECTED] 
and delete it from your system. Thank you.

[Non-text portions of this message have been removed]

Kirim email ke