SELECT * FROM V$DB_OBJECT_CACHE WHERE name=upper('Fn_JS_DBlink_BM') AND LOCKS!='0';select SID from V$ACCESS WHERE object=upper('Fn_JS_DBlink_BM'); --S ...
SELECT * FROM V$DB_OBJECT_CACHE WHERE name=upper('Fn_JS_DBlink_BM') AND LOCKS!='0';
select SID from V$ACCESS WHERE object=upper('Fn_JS_DBlink_BM');
--SID---------- 6566
select a.SID,a.SERIAL#,b.SPID from v$session a,v$process b where a.SID=6566 and a.PADDR=b.ADDR;
select a.SID,a.SERIAL#,b.SPID,a.STATUS from v$session a,v$process b where a.SID=6566 and a.PADDR=b.ADDR;
殺會話或kill spid