问题描述:在创建索引时报错ORA-00054,如下所示:
数据库:oracle 11.2.0.4 64位
SQL> create index idx_aud_ntimestamp on aud$ (NTIMESTAMP#);
create index idx_aud_ntimestamp on aud$ (NTIMESTAMP#)
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
提示资源正忙,要求指定NOWAIT.
解决过程:
1、查有没有对象被锁.
select * from v$locked_object;
2、查被锁对象的session_id.
select session_id from v$locked_object;
3、查sid和serial#.(说明:sid即以上查得的session_id)
select sid, serial#, username, osuser from v$session where sid = '356';
4、kill进程
alter system kill session '356,10289' immediate;
说明:解决过程中在执行第2步时,就查不到存在被锁对象,此后成功创建索引.

参考网址:https://blog.csdn.net/weixin_62685484/article/details/125331714