oracle之 RA-00054: resource busy and acquire with NOWAIT
1、 truncate 表報 ORA-00054 ,標明有事務正在操作該表
SQL> truncate table alldm.DM_XQKD_YUJING_D;
truncate table alldm.DM_XQKD_YUJING_D
*
ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
2、 找到正在操作該表的session與sql
SQL> set linesize 400
SQL> set pagesize 400
SQL> col object_name for a40
SQL> select OWNER,OBJECT_NAME,OBJECT_ID from dba_objects where object_name='DM_XQKD_YUJING_D';
OWNER OBJECT_NAME OBJECT_ID
------------------------------ ---------------------------------------- ----------
ALLDM DM_XQKD_YUJING_D 7525915
SQL> select SESSION_ID,OBJECT_ID from v$locked_object where OBJECT_ID = '7525915';
SESSION_ID OBJECT_ID
---------- ----------
2226 7525915
SQL> set linesize 400
SQL> set pagesize 400
SQL>
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;
Enter value for sid: 2226
old 3: and a.sid=&sid order by piece
new 3: and a.sid=2226 order by piece
SQL_TEXT
----------------------------------------------------------------
INSERT /*+APPEND*/ INTO DM_XQKD_YUJING_D SELECT /*+ORDERED*/ :B2
, A.AREA_NO, A.CITY_NO, A.XIAOQU_NO PLOT_ID, A.XIAOQU_NAME PLOT
3、 找到該session的os程式
select a.username,
a.sid,
a.serial#,
b.spid "OS Process",
to_char(a.logon_time,'DD/MM/YYYY hh24:mi:ss') "Logon time",
a.osuser,
a.program,
a.status
from v$session a, v$process b
where a.sid = &sid
and a.paddr = b.addr
/
USERNAME SID SERIAL# OS Process Logon time OSUSER PROGRAM STATUS
------------------------------ ---------- ---------- ------------------------ ------------------- ------------------------------ ------------------------------------------------ --------
ALLDM 2226 28311 76949 13/01/2018 06:04:24 bca JDBC Thin Client ACTIVE
4、 kill session
SQL> alter system kill session '2226,28311';
System altered.
5、 在os層面核實程式是否被kill
oracle@hbdw1:/oratmp$ps -ef | grep 76949
oracle 11057 116412 0 16:21 pts/2 00:00:00 grep 76949
6、 再次truncate成功
SQL> truncate table alldm.DM_XQKD_YUJING_D;
Table truncated.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31383567/viewspace-2150114/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-00054:resource busy and acquire with nowaitUIAI
- ORA-00054: resource busy and acquire with NOWAITUIAI
- ORA-00054: resource busy and acquire with NOWAIT specifiedUIAI
- ora-00054:resource busy and acquire with nowait specifiedUIAI
- ORA-00054: resource busy and acquire with NOWAIT specified處理UIAI
- ora-00054:resource busy and acquire with nowait specified解決方法UIAI
- "ORA-00054 resource busy and acquire with NOWAIT specified"的解決方法UIAI
- ORA-00054,ORA-00031 resource busy and acquire with NOWAIT 資源佔用處理過程UIAI
- Oracle ASM oracleasm createdisk "Device or resource busy"OracleASMdev
- Oracle wait interface - ORA-00054: resource busyOracleAI
- gc buffer busy acquire問題處理GCUI
- open failed: EBUSY (Device or resource busy)AIdev
- Linux rm -rf 之rm: cannot remove `linux': Device or resource busyLinuxREMdev
- device-mapper create ioctl failed: Device or resource busydevAPPAI
- FILE ON OCFS CANNOT BE DELETED LINUX ERROR: 16: DEVICE OR RESOURCE BUSYdeleteLinuxErrordev
- 分析解決11gR2 雙節點RAC環境下的gc cr block busy/gc buffer busy acquire等待GCBloCUI
- 【TUNE_ORACLE】等待事件之“buffer busy waits”Oracle事件AI
- Oracle Buffer Busy WaitsOracleAI
- [摘錄]Oracle Wait Interface之Buffer busy waits事件OracleAI事件
- oracle之報錯:ORA-00054: 資源正忙,要求指定 NOWAITOracleAI
- Oracle Database Resource ManagerOracleDatabase
- Oracle simple resource planOracle
- Oracle Resource Manager概述Oracle
- Oracle中的for update 和 for update nowaitOracleAI
- mysql innodb之select for update nowaitMySqlAI
- oracle錯誤處理之ORA-00054:資源正忙,要求指定NOWAITOracleAI
- 2.7 Overview of Oracle Resource Manager in a CDBViewOracle
- Oracle 資源管理(resource manager)Oracle
- oracle resource manager (ORM)舉例OracleORM
- Oracle資源正忙,要求指定NOWAIT——Oracle解鎖問題OracleAI
- oracle buffer busy waits等待的含義OracleAI
- Oracle DRM 簡介(Dynamic Resource management)Oracle
- Change AUTO_START in ASM Resource Oracle ClusterwareASMOracle
- Oracle資料庫buffer busy wait等待事件 (2)Oracle資料庫AI事件
- Oracle資料庫buffer busy wait等待事件 (1)Oracle資料庫AI事件
- gc buffer busyGC
- select for update nowaitAI
- for update和for update nowaitAI