--先查出被锁的会话id
select * from dba_ddl_locks a where upper( a.name)=upper('secom_pcdi_pkg')
--查出会话是谁
select sa.MODULE,
sl.OPNAME,
to_char(sl.start_time, 'yyyy-mm-dd hh24:mi:ss') start_time,
sa.SQL_TEXT,
pr.*,
'||',
se.*
from v$session se, v$process pr, v$session_longops sl, v$sqlarea sa
where se.PADDR = pr.ADDR(+)
and se.SID = sl.SID(+)
and sl.sql_hash_value = sa.hash_value(+)
--and se.module like '%' || upper('macarena_xi') || '%'
--and sl.START_TIME is not null
--and pr.SPID in (32257)
and se.SID in (
40
,330
,349)