ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
来源:互联网 发布:warframe漂亮捏脸数据 编辑:程序博客网 时间:2024/06/08 06:26
今天在drop一张表的时候报ORA-00054错误
SQL> drop table t2;
drop table t2
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
google之后,参考网上的高手,操作如下:
1.用dba权限的用户查看数据库都有哪些锁
SQL> select t2.username,t2.sid,t2.serial#,t2.logon_time
2 from v$locked_object t1,v$session t2
3 where t1.session_id=t2.sid order by t2.logon_time;
USERNAME SID SERIAL# LOGON_TIM
------------------------------ ---------- ---------- ---------
CLS 1 7 23-JUL-12
CLS 1 7 23-JUL-12
知道被锁的用户cls,sid为1,serial#为7
2.根据sid查看具体的sql语句,如果sql不重要,可以kill
SQL> select sql_text from v$session a,v$sqltext_with_newlines b
2 where DECODE(a.sql_hash_value,0,prev_hash_value,sql_hash_value)=b.hash_value
3 and a.sid=&sid order by piece;
Enter value for sid: 1
old 3: and a.sid=&sid order by piece
new 3: and a.sid=1 order by piece
SQL_TEXT
----------------------------------------------------------------
DELETE FROM PLAN_TABLE WHERE STATEMENT_ID=:1
3.kill该事务
SQL> alter system kill session '1,7';
System altered.
4.这样就可以执行其他的事务sql语句了
SQL> drop table t2;
Table dropped.
From:http://space.itpub.net/12778571/viewspace-561543
SQL> drop table t2;
drop table t2
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
google之后,参考网上的高手,操作如下:
1.用dba权限的用户查看数据库都有哪些锁
SQL> select t2.username,t2.sid,t2.serial#,t2.logon_time
2 from v$locked_object t1,v$session t2
3 where t1.session_id=t2.sid order by t2.logon_time;
USERNAME SID SERIAL# LOGON_TIM
------------------------------ ---------- ---------- ---------
CLS 1 7 23-JUL-12
CLS 1 7 23-JUL-12
知道被锁的用户cls,sid为1,serial#为7
2.根据sid查看具体的sql语句,如果sql不重要,可以kill
SQL> select sql_text from v$session a,v$sqltext_with_newlines b
2 where DECODE(a.sql_hash_value,0,prev_hash_value,sql_hash_value)=b.hash_value
3 and a.sid=&sid order by piece;
Enter value for sid: 1
old 3: and a.sid=&sid order by piece
new 3: and a.sid=1 order by piece
SQL_TEXT
----------------------------------------------------------------
DELETE FROM PLAN_TABLE WHERE STATEMENT_ID=:1
3.kill该事务
SQL> alter system kill session '1,7';
System altered.
4.这样就可以执行其他的事务sql语句了
SQL> drop table t2;
Table dropped.
From:http://space.itpub.net/12778571/viewspace-561543
- ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired解决方法
- ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- java.sql.SQLException: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- ddl_lock_timeout 与 ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- ddl_lock_timeout 与 ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- Oracle中的ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- 【Oracle】ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- ora-00054:resource busy and acquire with nowait specified解决方法
- ora-00054:resource busy and acquire with nowait specified解决方法
- ora-00054:resource busy and acquire with nowait specified解决方法
- Ora-00054 resource busy and acquire with nowait specified
- Ora-00054 resource busy and acquire with nowait specified
- ora-00054:resource busy and acquire with nowait specified解决方法
- ora-00054:resource busy and acquire with nowait specified解决方法
- oracle ora-00054:resource busy and acquire with nowait specified
- stripped 和 not stripped
- TexturePacker 到 flash 的简单使用
- 非常有用的技术博文网址
- VIM REFERENCE MANUAL by Bram Moolenaar
- poj 2400 Supervisor, Supervisee 二分匹配 最小权完美匹配 KM算法
- ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
- const的用法
- Command模式
- 串行的blast+2.2.25本地化: blastdbcmd,makeblastdb,blastn.简介
- “金银花露”是夏令保健清凉饮料 养生专属!
- Gedit中文乱码解决。我使用了gconftool-2 那行
- 打印5阶幻方
- sar访谈
- java代码执行js