查詢DB執行中的物件與刪除 Session
查詢DB執行中的物件:
FROM v$db_object_cache
WHERE locks > 0 AND pins > 0 AND type = 'PROCEDURE' --type = 查看哪種類型物件
查詢DB Session ID:
FROM SYS.V_$ACCESS a, SYS.V_$SESSION b
WHERE a.TYPE = 'PROCEDURE' AND a.SID = b.SID AND b.STATUS = 'ACTIVE'
刪除DB Session:
Session ID的組成為 SID + , + SERIAL#
Ex. SID = 157, SERIAL# = 59799 > Session ID = 157,59799