Because your table is locked by someone using select ...for update of nowait statement .  The way to find who is locking your object is V$LOCKED_OBJECTS + V$SESSION .  write rollback or commit in the locking session , then you can do your drop table .

解决方案 »

  1.   

    用中文给你解释一下:
    你的表被锁住了,可以通过V$LOCKED_OBJECTS + DBA_OBJECTS + V$SESSION 查看是谁干的,如果他总不释放,建议杀掉他以释放该锁
      

  2.   

    请问高手如何查看V$LOCKED_OBJECTS + DBA_OBJECTS + V$SESSION ?
      

  3.   

    以下语句可以发现所有用户锁
    select s.username,
    decode(l.type,'TM','TABLE LOCK',
                  'TX','ROW LOCK',
                  NULL) LOCK_LEVEL,
    o.owner,o.object_name,o.object_type,s.terminal,s.machine,s.program,s.osuser
    from v$session s,v$lock l,dba_objects o
    where s.sid=l.sid
    and o.object_id=l.id1
    and s.username is not null如果有锁等待或死锁,可以通过以下语句发现
    select lpad(' ',decode(l.xidusn,0,3,0))||l.oracle_username User_name,
           o.owner,o.object_name,o.object_type
    from v$locked_object l,dba_objects o
    where l.object_id=o.object_id
    order by o.object_id desc