因为表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#';