因為表kol_xx_fin050_temp 為臨時表,而且有其他session正在使用。
select vs.* from v$session vs , v$lock vl , dba_objects obj where 1 = 1 and obj.object_id = vl.id1 and vl.sid = vs.sid and obj.object_name = 'kol_xx_fin050_temp';
處理步驟:
1、先從 dba_objects / user_objects中查詢到該表的object_id:
select object_id from dba_objects where object_name=upper('kol_xx_fin050_temp');
2、根據查到的object_id知道使用該表的session:
select * from v$lock where id1=&object_id;
3、在從v$session視圖中查到該session的sid和serial#:
select * from v$session where sid=331;
4、殺掉這些進程:
alter system kill session 'sid,serial#';
