• ORACLE查看锁(lock)情况


      SELECT /*+ RULE */

            ls.osuser os_user_name,

             ls.username user_name,

             DECODE (ls.TYPE,

                     'RW', 'Row wait enqueue lock',

                     'TM', 'DML enqueue lock',

                     'TX', 'Transaction enqueue lock',

                     'UL', 'User supplied lock')

                lock_type,

             o.object_name object,

             DECODE (ls.lmode,

                     1, NULL,

                     2, 'Row Share',

                     3, 'Row Exclusive',

                     4, 'Share',

                     5, 'Share Row Exclusive',

                     6, 'Exclusive',

                     NULL)

                lock_mode,

             o.owner,

             ls.sid,

             ls.serial# serial_num,

             ls.id1,

             ls.id2

        FROM sys.dba_objects o,

             (SELECT s.osuser,

                     s.username,

                     l.TYPE,

                     l.lmode,

                     s.sid,

                     s.serial#,

                     l.id1,

                     l.id2

                FROM v$session s, v$lock l

               WHERE s.sid = l.sid) ls

       WHERE o.object_id = ls.id1 AND o.owner <> 'SYS'

    ORDER BY o.owner, o.object_name;

     

  • 相关阅读:
    Linux安装.net core
    在IIS中如何配置SSL(https)
    Lambda的前世今生
    Java建造者模式
    leetcode 83 Remove Duplicates from Sorted List
    【设计】Office
    【设计】简书品牌重构
    【设计总结】
    【交互设计】
    【设计总结】
  • 原文地址:https://www.cnblogs.com/quanweiru/p/4129635.html
Copyright © 2020-2023  润新知