博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
查看被锁的数据[Z]
阅读量:5326 次
发布时间:2019-06-14

本文共 1822 字,大约阅读时间需要 6 分钟。

SELECT LOCK_INFO.OWNER || '.' || LOCK_INFO.OBJ_NAME AS OBJ_NAME --对象名称(已经被锁住)      ,LOCK_INFO.SUBOBJ_NAME AS SUBOBJ_NAME --子对象名称(已经被锁住)         ,SESS_INFO.MACHINE AS MACHINE --机器名称      ,LOCK_INFO.SESSION_ID AS SESSION_ID --会话SESSION_ID         ,SESS_INFO.SERIAL# AS SERIAL# --会话SERIAL#         ,LOCK_INFO.ORA_USERNAME AS ORA_USERNAME --ORACLE系统用户名称      ,LOCK_INFO.OS_USERNAME AS OS_USERNAME --操作系统用户名称      ,LOCK_INFO.PROCESS AS PROCESS --进程编号      ,LOCK_INFO.OBJ_ID AS OBJ_ID --对象ID         ,LOCK_INFO.OBJ_TYPE AS OBJ_TYPE --对象类型      ,SESS_INFO.LOGON_TIME AS LOGON_TIME --登录时间      ,SESS_INFO.PROGRAM AS PROGRAM --程序名称      ,SESS_INFO.STATUS AS STATUS --会话状态      ,SESS_INFO.LOCKWAIT AS LOCKWAIT --等待锁      ,SESS_INFO.ACTION AS ACTION --动作      ,SESS_INFO.CLIENT_INFO AS CLIENT_INFO --客户信息  FROM (SELECT obj.OWNER                AS OWNER              ,obj.OBJECT_NAME          AS OBJ_NAME              ,obj.SUBOBJECT_NAME       AS SUBOBJ_NAME              ,obj.OBJECT_ID            AS OBJ_ID              ,obj.OBJECT_TYPE          AS OBJ_TYPE              ,lock_obj.SESSION_ID      AS SESSION_ID              ,lock_obj.ORACLE_USERNAME AS ORA_USERNAME              ,lock_obj.OS_USER_NAME    AS OS_USERNAME              ,lock_obj.PROCESS         AS PROCESS          FROM (SELECT *                  FROM all_objects                 WHERE object_id IN (SELECT object_id FROM v$locked_object)) obj              ,v$locked_object lock_obj         WHERE obj.object_id = lock_obj.object_id) LOCK_INFO      ,(SELECT SID              ,SERIAL#              ,LOCKWAIT              ,STATUS              ,PROGRAM              ,ACTION              ,CLIENT_INFO              ,LOGON_TIME              ,MACHINE          FROM v$session) SESS_INFO WHERE LOCK_INFO.SESSION_ID = SESS_INFO.SID;

转载于:https://www.cnblogs.com/huak/p/4299488.html

你可能感兴趣的文章
20165301 2017-2018-2 《Java程序设计》第九周学习总结
查看>>
jquery验证图片类型与大小
查看>>
tomcat启动时出现了Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
查看>>
memcached命令
查看>>
基础测试jmeter5.0+badboy(从小白到入门)
查看>>
【bzoj2764】[JLOI2011]基因补全 dp+高精度
查看>>
JQuery
查看>>
8.管好软件
查看>>
Java基础之字符串匹配大全
查看>>
SGA和PGA的分配原则及更改大小
查看>>
面向对象
查看>>
lintcode83- Single Number II- midium
查看>>
HTML5学习笔记简明版(2):新元素之section,article,aside
查看>>
移动端 响应式、自适应、适配 实现方法分析(和其他基础知识拓展)
查看>>
CodeForces 605 E. Intergalaxy Trips
查看>>
TT8509: PL/SQL execution terminated; PLSQL_TIMEOUT exceeded
查看>>
华为十年
查看>>
android中关于的dpi,dp,dip的定义及转换
查看>>
thread msg
查看>>
【重点突破】——第三方绘图工具FusionCharts.js的使用详解
查看>>