關聯v$session,v$locked_object,dba_objects查出鎖死會話及物件
select c.sid,c.serial#,c.machine,c.terminal,b.object_name,a.locked_mode from v$locked_object a,dba_objects b,v$session c where a.object_id=b.object_id and c.sid=a.session_id;
SID SERIAL# MACHINE TERMINAL OBJECT_NAME LOCKED_MODE
---------- ---------- ---------------------------------------------------------------- ------------------------------ -------------------------------------------------------------------------------------------------------------------------------- -----------
958 517 WORKGROUP\DELL-158 DELL-158 E_GRADEINFO 3
919 232 Dev12-PC unknown E_GRADEINFO 3
---------- ---------- ---------------------------------------------------------------- ------------------------------ -------------------------------------------------------------------------------------------------------------------------------- -----------
958 517 WORKGROUP\DELL-158 DELL-158 E_GRADEINFO 3
919 232 Dev12-PC unknown E_GRADEINFO 3
SQL> alter system kill session '919,232';
系統已更改。
SQL> select c.sid,c.serial#,c.machine,c.terminal,b.object_name,a.locked_mode from v$locked_object a,dba_objects b,v$session c where a.object_id=b.object_id and c.sid=a.session_id;
SID SERIAL# MACHINE TERMINAL OBJECT_NAME LOCKED_MODE
---------- ---------- ---------------------------------------------------------------- ------------------------------ -------------------------------------------------------------------------------------------------------------------------------- -----------
958 517 WORKGROUP\DELL-158 DELL-158 E_GRADEINFO 3
---------- ---------- ---------------------------------------------------------------- ------------------------------ -------------------------------------------------------------------------------------------------------------------------------- -----------
958 517 WORKGROUP\DELL-158 DELL-158 E_GRADEINFO 3
SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-667810/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 殺會話之查詢鎖表的物件及相關操作會話物件
- 10.17 V$SESSIONSession
- V$SESSION COMMANDSession
- oracle 會話(session)被鎖瞭解決方法Oracle會話Session
- session和v$session說明Session
- v$Session詳解Session
- 10.18 V$SESSION_BLOCKERSSessionBloC
- 10.21 V$SESSION_EVENTSession
- 10.25 V$SESSION_WAITSessionAI
- Cassandra的Session會話Session會話
- 10.27 V$SESSION_WAIT_HISTORYSessionAI
- 10.26 V$SESSION_WAIT_CLASSSessionAI
- [20221023]v$session_longops.txtSessionGo
- PostgreSQL死鎖相關SQL
- 會話技術之 Session會話Session
- 會話層技術-session會話Session
- 10、flask-會話-sessionFlask會話Session
- session與sessionStorage 關聯Session
- [20211019]V$DETACHED_SESSION檢視.txtSession
- LiteOS:SpinLock自旋鎖及LockDep死鎖檢測
- Sequelize 中文文件 v4 – Associations – 關聯
- mysql鎖與會話MySql會話
- 利用v$session_longops監控長操作SessionGo
- V$ACTIVE_SESSION_HISTORY檢視的使用Session
- 兩個會話分別只執行一個SQL,可能形成死鎖嗎會話SQL
- ZooKeeper如何模擬會話失效(Session Expired)會話Session
- 令牌Token和會話Session原理與攻略會話Session
- MQTT 持久會話與 Clean Session 詳解MQQT會話Session
- MySQL-lock(鎖)-v2.0MySql
- v$session - 你看到的event真的是session當前的等待事件麼?Session事件
- Oracle9i中v$sql、v$sqlarea、v$sqltext、v$sql_plan的聯絡與區別OracleSQL
- 死鎖
- 大話Synchronized及鎖升級synchronized
- 次世代的會話管理專案 Spring Session會話SpringSession
- nodejs學習08——會話控制 session cookie tokenNodeJS會話SessionCookie
- Session會話筆記,維護一個客戶端和伺服器之間關聯的一種技術Session會話筆記客戶端伺服器
- MTS方式連線V$SESSION中的SERVER狀態SessionServer
- eclipse下如何關聯android-support-v4.jar原始碼EclipseAndroidJAR原始碼
- 什麼是死鎖?如何解決死鎖?