試圖變更Procedure內部使用的暫存資料表:

alter table TEMPBUFFER modify EXCHANGERATE NUMBER(14,5)

執行時一直傳回 ORA-14450 attempt to access a transactional temp table already in use

理論上Procedure不會一直在執行中,應該是有人手動操作時沒有Commit,到底是誰呢?

DBA指點我用以下方法,可以查出誰在鎖定它: (要被Grant Permission才可用)

select * from v$session
where SID = (
      select SID from v$lock where id1=(
             select object_id
             from user_objects
             where object_name=UPPER('TEMPBUFFER')
      )
)

Comments

Be the first to post a comment

Post a comment


78 - 66 =