Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: HOW TO GET THE RECORD LOCKED !!
engsys_at_merlion.singnet.com.sg wrote:
>
> Hi there,
> Can anyone let me know how to get the exact record locked
> if i have the dba privileges and access to all table.
>
> What i would like to know is by looking at the values at v$lock and
> v$session and whatever how do i get the exact record in the
> database table.
>
> Thanks a lot.
>
> P L Prasad.
In pre 7.3 versions your mostly SOL. You can get the user, object, lock type, and sql text, but not the rowid.
In Oracle 7.3.3 the ROW_WAIT_* columns on v$session provide what your looking for (see below).
SQL> desc v$session
Name Null? Type ------------------------------- -------- ---- SADDR RAW(4) SID NUMBER SERIAL# NUMBER AUDSID NUMBER PADDR RAW(4) USER# NUMBER USERNAME VARCHAR2(30) ---cut--- ROW_WAIT_OBJ# NUMBER ROW_WAIT_FILE# NUMBER ROW_WAIT_BLOCK# NUMBER ROW_WAIT_ROW# NUMBER
SQL> brian.maclean_at_teldta.com Received on Tue May 20 1997 - 00:00:00 CDT