ora-00054:resource busy and acquire with nowait specified解决方法
来源:互联网 发布:博远软件 编辑:程序博客网 时间:2024/06/12 01:39
当某个数据库用户在数据库中插入、更新、删除一个表的数据,或者增加一个表的主键时或者表的索引时,常常会出现ora-00054:resource busy and acquire with nowait specified这样的错误。
主要是因为有事务正在执行(或者事务已经被锁),所有导致执行不成功。
1、用dba权限的用户查看数据库都有哪些锁
select t2.username,t2.sid,t2.serial#,t2.logon_time
from v$locked_object t1,v$session t2
where t1.session_id=t2.sid order by t2.logon_time;
如:testuser 339 13545 2009-3-5 17:40:05
知道被锁的用户testuser,sid为339,serial#为13545
2、根据sid查看具体的sql语句,如果sql不重要,可以kill
select sql_text from v$session a,v$sqltext_with_newlines b
where DECODE(a.sql_hash_value, 0, prev_hash_value, sql_hash_value)=b.hash_value
and a.sid=&sid order by piece;
查出来的sql,如: begin :id := sys.dbms_transaction.local_transaction_id; end;
3、kill该事务
alter system kill session '339,13545';
4、这样就可以执行其他的事务sql语句了
如增加表的主键:
alter table test
add constraint PK_test primary key (test_NO);
- 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解决方法
- 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解决方法
- 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解决方法
- 浅谈C++ Builder6.0进行数字图像处理
- 如何解决没有找到borlndmm.dll或cc3260mt.dll的错误
- 好烦人的C++ Builder:[linker fatal error]:Expected a file name的解决办法
- 冈萨雷斯《数字图像处理》第三章:亮度变换和空间滤波
- 性能测试的那些破事儿!!!
- ora-00054:resource busy and acquire with nowait specified解决方法
- 浅谈用VC6.0单文档进行数字图像处理(上)
- 浅谈用VC6.0单文档进行数字图像处理(下)
- 如何解决VC6.0中Win32 error 267错误
- 今天也算Hack下了
- Matlab编程和其他语言的区别
- 内部软件就不用做UI测试及浏览器兼容测试吗?
- VML 入门1
- 地籍图