ORA-00054 resource busy and acquire with NOWAIT specifiedCause: The NOWAIT keyword forced a return to the command prompt because a resource was unavailable for a LOCK TABLE or SELECT FOR UPDATE command.Action: Try the command after a few minutes or enter the command without the NOWAIT keyword 是不是你的查询不正确: To find the table name that corresponds to a particular OBJECT_ID of the V$LOCKED_OBJECT view: select xidusn, object_id, session_id, locked_mode from v$locked_object; XIDUSN OBJECT_ID SESSION_ID LOCKED_MODE --------- --------- ---------- ----------- 3 2711 9 3 0 2711 7 3 select object_name from dba_objects where object_id = 2711; OBJECT_NAME ------------- S_EMP 是这样的吗,应该能够看到呀
ORA-00054 resource busy and acquire with NOWAIT specifiedCause: The NOWAIT keyword forced a return to the command prompt because a resource was unavailable for a LOCK TABLE or SELECT FOR UPDATE command.Action: Try the command after a few minutes or enter the command without the NOWAIT keyword 是不是你的查询不正确: To find the table name that corresponds to a particular OBJECT_ID of the V$LOCKED_OBJECT view: select xidusn, object_id, session_id, locked_mode from v$locked_object; XIDUSN OBJECT_ID SESSION_ID LOCKED_MODE --------- --------- ---------- ----------- 3 2711 9 3 0 2711 7 3 select object_name from dba_objects where object_id = 2711; OBJECT_NAME ------------- S_EMP 是这样的吗,应该能够看到呀
用 select a.username, a.sid, a.serial#, b.id1, c.sql_text from v$session a, v$lock b, v$sqltext c where a.lockwait = b.kaddr and a.sql_address = c.address and a.sql_hash_value = c.hash_value; 来查询当前被锁住的用户列表,如下: USERNAME SID SERIAL# ID1 SQL_TEXT SCOTT 11 9 131080 update plsql_user.s_employee set salary = 5000
锁有很多种的! RX,X,SRX等等
查锁: SELECT A.OWNER, A.OBJECT_NAME, B.XIDUSN, B.XIDSLOT, B.XIDSQN, B.SESSION_ID, B.ORACLE_USERNAME, B.OS_USER_NAME, B.PROCESS, B.LOCKED_MODE, C.MACHINE, C.STATUS, C.SERVER, C.SID, C.SERIAL#, C.PROGRAM FROM ALL_OBJECTS A, V$LOCKED_OBJECT B, SYS.GV_$SESSION C WHERE ( A.OBJECT_ID = B.OBJECT_ID ) AND (B.PROCESS = C.PROCESS ) ORDER BY 1,2
v$locked_object视图里一条记录也没有,但我要更改某表的结构时却出现: ora-00054:resouce busy and acquire with NOWAIT specified
是不是你的查询不正确:
To find the table name that corresponds to a particular OBJECT_ID of the
V$LOCKED_OBJECT view:
select xidusn, object_id, session_id, locked_mode from v$locked_object;
XIDUSN OBJECT_ID SESSION_ID LOCKED_MODE
--------- --------- ---------- -----------
3 2711 9 3
0 2711 7 3
select object_name from dba_objects where object_id = 2711;
OBJECT_NAME
-------------
S_EMP
是这样的吗,应该能够看到呀
是不是你的查询不正确:
To find the table name that corresponds to a particular OBJECT_ID of the
V$LOCKED_OBJECT view:
select xidusn, object_id, session_id, locked_mode from v$locked_object;
XIDUSN OBJECT_ID SESSION_ID LOCKED_MODE
--------- --------- ---------- -----------
3 2711 9 3
0 2711 7 3
select object_name from dba_objects where object_id = 2711;
OBJECT_NAME
-------------
S_EMP
是这样的吗,应该能够看到呀
select a.username, a.sid, a.serial#, b.id1, c.sql_text
from v$session a, v$lock b, v$sqltext c
where a.lockwait = b.kaddr
and a.sql_address = c.address
and a.sql_hash_value = c.hash_value;
来查询当前被锁住的用户列表,如下:
USERNAME SID SERIAL# ID1 SQL_TEXT
SCOTT 11 9 131080 update plsql_user.s_employee set salary = 5000
RX,X,SRX等等
SELECT A.OWNER,
A.OBJECT_NAME,
B.XIDUSN,
B.XIDSLOT,
B.XIDSQN,
B.SESSION_ID,
B.ORACLE_USERNAME,
B.OS_USER_NAME,
B.PROCESS,
B.LOCKED_MODE,
C.MACHINE,
C.STATUS,
C.SERVER,
C.SID,
C.SERIAL#,
C.PROGRAM
FROM ALL_OBJECTS A,
V$LOCKED_OBJECT B,
SYS.GV_$SESSION C
WHERE ( A.OBJECT_ID = B.OBJECT_ID )
AND (B.PROCESS = C.PROCESS )
ORDER BY 1,2
ora-00054:resouce busy and acquire with NOWAIT specified