ORA-04021:timeout occurred while waiting to lock object

编译某存储过程 ORA-04021 timeout occurred while waiting to lock object stringstringstringstringstring Cause: While waiting to lock a library object, a timeout is occurred. Action: Retry the operation later.

查找是否有用户类型的锁,即

TM                DML排队

TX                事务处理排队

UL                 用户提供

select * from v$lock where type in (‘TM‘,‘TX‘,‘UL‘)

结果果然查到有一个sid为17,类型为TX的锁,可以断定就是这个锁导致上面的错误

再查相应的sid和serial#

select * from v$session where sid=17

杀掉它

alter system kill session ‘17,36383‘

ORA-00031: session marked for kill ,说明已经是被kill一次过的了,session的status为killed

再查操作系统对应的SPID select spid from v$process p,v$session s where s.paddr=p.addr and sid=17

查到是17297

$ kill -9 17297

重新编译,成功了

时间: 2024-10-02 06:32:43

ORA-04021:timeout occurred while waiting to lock object的相关文章

oracle plsql 上对package 包执行重新编译时,超时无响应:(4021)time-out occurred while waiting to lock object

问题处理过程: 开发反应包存在问题, 我一看他们的用户没对应的权限,给赋予了以下权限: GRANT debug any procedure, debug connect session TO CMSOPR; GRANT EXECUTE any procedure TO CMSOPR; 开发进行调试后没执行结果. 于是我想重新编译,先重新编译的包,半天报个响应超时,当时也没想太多,以为有死锁,于是查数据库锁 -没锁. 查数据库审计表: select * from dba_audit_trail w

ORA-04021 timeout occurred while waiting to lock object

用户要求删除一个数据库的用户 GREENPASS,在删除的过程中,报错如下: drop user GREENPASS * ERROR at line 1: ORA-04021: timeout occurred while waiting to lock object NEWDR.HNDR_SMS_LOG 处理过程 1. 首先查询NEWDR.HNDR_SMS_LOG,这是一个'PROCEDURE': 2. 现在报错,不能对此对象进行锁定. 3. 看看什么会话在访问此对象: select B.SI

关于等待多长时间会引发ORA-04021: timeout occurred while waiting to lock object错误的猜测

本文的实验环境为: [[email protected] ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 10 07:18:11 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 -

关于ORA-04021解决办法(timeout occurred while waiting to lock object)

某个应用正在锁定该表或者包 表为 select b.SID,b.SERIAL#,c.SQL_TEXT from v$locked_object a, v$session b, v$sqlarea c where a.SESSION_ID = b.SID and b.SQL_ADDRESS = c.ADDRESS and c.sql_text like '%table_name%' 包为 select B.SID,b.USERNAME,b.MACHINE FROM V$ACCESS A, V$SE

org.eclipse.jdi.TimeoutException:Timeout occurred while waiting for packet 1983.occurred

1.错误描述 2.错误原因 3.解决办法

jedis异常:NoSuchElementException: Timeout waiting for idle object

项目线上环境发现:java.util.NoSuchElementException: Timeout waiting for idle object 问题原因:不应该在try中释放资源,而应该在finally中处理.虽然是非常基础的语法,但还是有可能会写错,维护老系统时发现很几处都存在这种潜在的Bug,引以为戒.在try中释放资源,每当出现一次异常将会导致一个jedis对象无法释放,pool池中可用的jedis对象资源会越来越少,最终将会导致java.util.NoSuchElementExce

Cannot get a connection, pool error Timeout waiting for idle object

Cannot get a connection, pool error Timeout waiting for idle object 异常原因 一直有hibernate的session在开启并偿试打开新连接,导致最终没有空闲链接可用. PCISV7-VHL [2017-09-07 19:10:13,625]>>>ERROR>>>[ com.isoftstone.fwk.dao.BaseDao.getNewConnection(BaseDao.java:1534) ]-

ORA-12170: TNS:Connect timeout occurred

VM 作为ORACLE 服务器,客户端登陆提示超时,本地连接使用网络连接正常. D:>sqlplus system/[email protected]//192.168.63.121:15021/pdb01 SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 10 12:00:05 2016 Copyright (c) 1982, 2013, Oracle.  All rights reserved. ERROR: ORA-12170: TNS:

解决方案:android monkeyrunner:Timeout while trying to create chimp mananger(device = MonkeyRunner.waitForConnection()一直报错的问题)

monkeyrunner在执行device = MonkeyRunner.waitForConnection()一直报错的问题 (或者[main] [com.android.chimpchat.adb.AdbChimpDevice] Timeout while trying to create chimp mananger) 看到这篇文章的童鞋们.是不是自己很郁闷呢.看了其他人一直都能好好的运行(就算官方的demo都是那样写.就是自己机子不行) 1.叫你重装JDK或者重新配环境的人.就千万不要相