之前程序運行的時候,突然發(fā)生頁面卡死,后臺不報錯的現(xiàn)象,經(jīng)過排查是數(shù)據(jù)庫表被鎖死,下面的sql是查詢被鎖的表,以及對應(yīng)的解鎖sql;
創(chuàng)新互聯(lián)專業(yè)為企業(yè)提供洮北網(wǎng)站建設(shè)、洮北做網(wǎng)站、洮北網(wǎng)站設(shè)計、洮北網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計與制作、洮北企業(yè)網(wǎng)站模板建站服務(wù),10多年洮北做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡(luò)服務(wù)。
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;
select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid order by b.logon_time;
alter system kill session '300,37803';
SELECT s.sid, s.serial#, s.username, s.schemaname, s.osuser, s.process, s.machine,
s.terminal, s.logon_time, l.type
FROM v$session s, v$lock l
WHERE s.sid = l.sid
AND s.username IS NOT NULL
ORDER BY sid;