ORACLE library cache lock Query

Source: Internet
Author: User

ORACLE library cache lock query select Distinct/* + ordered */w1.sid waiting_session, h1.sid holding_session, w. kgllktype lock_or_pin, od. to_owner object_owner, od. to_name object_name, oc. type, decode (h. kgllkmod, 0, 'none', 1, 'null', 2, 'share', 3, 'clusive ', 'unknown') mode_held, decode (w. kgllkreq, 0, 'none', 1, 'null', 2, 'share', 3, 'clusive ', 'unknown') mode_requested, xw. KGLNAOBJ wait_ SQL, xh. KGLNAOBJ hold_ SQL from dba_kgllock w, dba_kgllock h, v $ session w1, v $ session h1, v $ object_dependency od, V $ DB_OBJECT_CACHE oc, x $ kgllk xw, x $ kgllk xh where (h. kgllkmod! = 0) and (h. kgllkmod! = 1) and (h. kgllkreq = 0) or (h. kgllkreq = 1) and (w. kgllkmod = 0) or (w. kgllkmod = 1) and (w. kgllkreq! = 0) and (w. kgllkreq! = 1) and w. kgllktype = h. kgllktype and w. kgllkhdl = h. kgllkhdl and w. kgllkuse = w1.saddr and h. kgllkuse = h1.saddr And od. to_address = w. kgllkhdl And od. to_name = oc. name And od. to_owner = oc. owner And w1.sid = xw. KGLLKSNM And h1.sid = xh. KGLLKSNM And (w1. SQL _ ADDRESS = xw. KGLHDPAR And w1. SQL _ HASH_VALUE = xw. KGLNAHSH) And (h1. SQL _ ADDRESS = xh. KGLHDPAR And h1. SQL _ HASH_VALUE = xh. KGLNAHSH );

Related Article

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.