Oracle Lock Query

Source: Internet
Author: User

--v$lock in ID1 when lock mode is TX, the first 2 segments of the physical ID are saved
SELECT *
From (SELECT S.sid,
TRUNC (Id1/power (2,)) RBS,
Bitand (ID1, To_number (' ffff ', ' xxxx ')) + 0 slots,
Id2 seq,
Lmode,
Request
S.username
From V$lock L, v$session s
where l.sid = s.sid) ls,
V$transaction T
WHERE T.xidusn = Ls.rbs
and T.xidslot = Ls.slot
and t.xidsqn = Ls.seq

--v$lock the object ID in ID1 when lock mode is TM
SELECT * from V$lock l,dba_objects d where d.object_id = L.ID1;

--DDL Lock
SELECT * from Dba_ddl_locks;

Oracle Lock Query

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.