Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: What locks the table?
"Linda Lee" <goforticket_at_yahoo.com> a écrit dans le message de
news:f901fb80.0311140834.64f09eea_at_posting.google.com...
> One of our applications always go down on Thursday night. I checked
> the locks on the database side and got a lock in a key table by using
> following sql. What really does locked_mode 2 do? Is it possible to
> trace the statement that locks the table?
> Thanks a lot.
> ~~~~~~~~~~~~~~~~~~~~~
> SQL> select v.object_id, t.object_name,
> 2 v.session_id, v.oracle_username,
> 3 v.os_user_name, v.locked_mode
> 4 from v$locked_object v, dba_objects T
> 5 where v.object_id = t.object_id;
>
> OBJECT_ID OBJECT_NAME SESSION_ID ORACLE_USERNAME LOCKED_MODE
> 193935 F91300 37 JDE 2
Join v$locked_object to v$transaction to get the transaction.
Then to v$session to get the session.
Then to v$sqlarea or v$sqltext to get the sql.
Hope this helps
Michel Cadot
Received on Fri Nov 14 2003 - 10:46:47 CST
![]() |
![]() |