Oracle 11g中想修改表名:
rename ASSETPORJECT to ASSETPROJECT;
结果提示:ORA-00054: 资源正忙, 但指定以 NOWAIT 方式获取资源, 或者超时失效。
看来有锁定该表的会话,于是,执行如下查询:
SELECT sid, serial#, username, osuser FROM v$session where sid
in(select session_id from v$locked_object);
--kill掉相关的会话
ALTER SYSTEM KILL SESSION '597,1171';
重新执行rename命令成功!