Home » SQL & PL/SQL » SQL & PL/SQL » How to know the locks on a object and the user placed on it
How to know the locks on a object and the user placed on it [message #249367] Wed, 04 July 2007 03:32 Go to next message
donind
Messages: 95
Registered: February 2007
Member
Hi,

which table i have to querry inorder to know the locks on a object and the user placed on it.

How to know the users working in same session?

Thanks in advance

[Updated on: Wed, 04 July 2007 03:36]

Report message to a moderator

Re: How to know the locks on a object and the user placed on it [message #249376 is a reply to message #249367] Wed, 04 July 2007 03:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> desc v$lock
 Name                             Null?    Type
 -------------------------------- -------- ----------------------
 ADDR                                      RAW(4)
 KADDR                                     RAW(4)
 SID                                       NUMBER
 TYPE                                      VARCHAR2(2)
 ID1                                       NUMBER
 ID2                                       NUMBER
 LMODE                                     NUMBER
 REQUEST                                   NUMBER
 CTIME                                     NUMBER
 BLOCK                                     NUMBER

SQL> desc v$locked_object
 Name                             Null?    Type
 -------------------------------- -------- ----------------------
 XIDUSN                                    NUMBER
 XIDSLOT                                   NUMBER
 XIDSQN                                    NUMBER
 OBJECT_ID                                 NUMBER
 SESSION_ID                                NUMBER
 ORACLE_USERNAME                           VARCHAR2(30)
 OS_USER_NAME                              VARCHAR2(30)
 PROCESS                                   VARCHAR2(12)
 LOCKED_MODE                               NUMBER

Regards
Michel
Re: How to know the locks on a object and the user placed on it [message #249773 is a reply to message #249376] Thu, 05 July 2007 17:58 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
http://www.jlcomp.demon.co.uk/faq/row_locker.html
Previous Topic: Approach to Purge Sensitive data periodically.
Next Topic: server databases
Goto Forum:
  


Current Time: Sat Dec 10 08:50:39 CST 2016

Total time taken to generate the page: 0.09612 seconds