Home  >  Article  >  Database  >  删除oracle未提交的事务

删除oracle未提交的事务

WBOY
WBOYOriginal
2016-06-07 15:44:321928browse

先查询出未提交的事务 SELECT dob.OBJECT_NAME Table_Name,lo.SESSION_ID||', '||vss.SERIAL# 删除号, lo.locked_mode,lo.SESSION_ID, vss.SERIAL#,vss.action Action,vss.osuser OSUSER, vss.LOGON_TIME, vss.process AP_PID, VPS.SPID DB_PID ,vss.* From

先查询出未提交的事务

SELECT dob.OBJECT_NAME Table_Name,lo.SESSION_ID||', '||vss.SERIAL# 删除号,  


lo.locked_mode,lo.SESSION_ID, vss.SERIAL#,vss.action Action,vss.osuser OSUSER, vss.LOGON_TIME,  

vss.process AP_PID, VPS.SPID DB_PID ,vss.*  

From v$locked_object lo, dba_objects dob, v$session vss, V$PROCESS VPS  

Where lo.OBJECT_ID = dob.OBJECT_ID  

and lo.SESSION_ID = vss.SID  

AND VSS.paddr = VPS.addr  

order by 2,3,DOB.object_name



删除查询出来的事务 ('34, 49517'  是上面查询出来的删除号)

ALTER system kill session '34, 49517'
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn