【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,看报错应该是锁导致的。报错如下:
SQL> alter table a modify (x varchar2(10));
alter table a modify (x varchar2(10))*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
解决如下:
1. sys用户或者有dba权限的用户登录,查找锁等待情况。
SQL> 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; USERNAME SID SERIAL# LOGON_TIM
------------------------------ ---------- ---------- ---------
SCOTT 27 19437 27-SEP-17
SCOTT 27 19437 27-SEP-17
2. 查询等待SQL文本,查询过程中需要输入SID号。
SQL> select sql_text from v$session a,v$sqltext_with_newlines bwhere DECODE(a.sql_hash_value, 0, prev_hash_value, sql_hash_value)=b.hash_valueand a.sid=&sid order by piece;
Enter value for sid: 27
old 3: and a.sid=&sid order by piece
new 3: and a.sid=27 order by pieceSQL_TEXT
----------------------------------------------------------------
select count(*) from a
3. 查询后发现是个无用的SQL,kill就可以了。
SQL> alter system kill session '27,19437';System altered.
4. 再次修改表字段属性,不在报错。
SQL> alter table a modify (x varchar2(10));Table altered.
【Oracle】ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired相关推荐
- oracle之 RA-00054: resource busy and acquire with NOWAIT specified or timeout expired
1. truncate 表报 ORA-00054 ,标明有事务正在操作该表 SQL> truncate table alldm.DM_XQKD_YUJING_D; truncate table ...
- ora-00054:resource busy and acquire with nowait specified
当某个数据库用户在数据库中插入.更新.删除一个表的数据,或者增加一个表的主键时或者表的索引时,常常会出现ora-00054:resource busy and acquire with nowait ...
- resource busy and acquire with nowait specified解决方法
http://blog.csdn.net/wbj1234566/article/details/4156147 resource busy and acquire with nowait specif ...
- ora-00054:resource busy and acquire with nowait specified解决方法
当某个数据库用户在数据库中插入.更新.删除一个表的数据,或者增加一个表的主键时或者表的索引时,常常会出现ora-00054:resource busy and acquire with nowait ...
- ORA-00054 resource busy and acquire with NOWAIT specified Cause 错误解决方法
1.查询被锁对象: select object_name,machine,s.sid,s.serial# from v$locked_object l,dba_objects o ,v$session ...
- 【Oracle】ORA 01810 格式代码出现两次-转
一.Oracle中使用to_date()时格式化日期需要注意格式码 如:select to_date('2005-01-01 13:14:20','yyyy-MM-dd HH24:mm:ss') fr ...
- 【Oracle】ORA-27369: job of type EXECUTABLE failed with exit code: Key has expired
问题描述:在使用DBMS_SCHEDULER调用shell时报错 ORA-27369: job of type EXECUTABLE failed with exit code: Key has ex ...
- Oracle删表报错ora00054,【Oracle】ORA-00054 错误解决方法
在进行数据库维护的过程中要删除一个中间表,遇到如下错误: sys@DW>drop table dwods.member_DELTA; drop table dwods.member_DELTA ...
- 【Oracle】PL/SQL 显式游标、隐式游标、动态游标
在PL/SQL块中执行SELECT.INSERT.DELETE和UPDATE语句时,Oracle会在内存中为其分配上下文区(Context Area),即缓冲区.游标是指向该区的一个指针,或是命名一个 ...
最新文章
- RESTful之权限Permissions
- 完成登录与注册页面的前端
- 网络营销——网络营销浅析网站不发文还能维持稳定排名吗?
- 内核:多内核操作模式
- CentOS7下安装tomcat8
- Thinkphp5.0快速入门笔记(3)
- python与数据库连接的代码_python连接数据库的案例及源代码
- 搜狗输入法错误推送地震信息,但其背后的真正价值值得思考
- js值的拷贝和值的引用_到达P值的底部:直观的解释
- 计算机网络原理(第三章) 传输层 课后习题
- 想让照片里的美女“回头”?清华MIT谷歌用AI帮你实现了
- 爬虫python需要安装吗_python爬虫需要安装什么
- 中概股“回A”政策趋紧 霞客环保终止卖壳
- Android校准指南针,电子罗盘的工作原理及校准 电子罗盘,电子指南针,android.docx...
- 搜索引擎Bing必应高级搜索技巧
- 经历3个失败的游戏创业公司,我所亲历的痛与教训
- 运营方法论——增长黑客
- MSP430F149 IO端口
- 模块sys, os, glob, pickle, subprocess常见用法
- 如何查看夜神、逍遥模拟器的端口