avatar
Oracle求助,thanks!!!# Database - 数据库
r*t
1
An urgent problem, thanks a lot if anybody can help!!!
I have several parallel processes like this:
my_program parameter1 &
my_program parameter2 &
...
my_program parametern &
In most of time, it runs as expected, but sometime it do give me an error li
ke this:
"Truncating table TABLE_A, ORA-00054: resource busy and acquire with NOWAIT
specified"
I am very positive that I have already removed all the truncation codes from
my program, but I still have this kind of error. Could anybody give me a h
avatar
z*y
2
这可能是rollback 没有完成。 你是不是曾经强制结束过语句?如果是, 你应该等回
滚结束。
你或者看一下有没有没有提交的transaction.
你可以试着在系统不忙的时候再试一次。
我不做oracle很久,如果说错了还望见谅。
avatar
r*t
3
Thanks a lot for your advice. I have similar guess but I don't know how to
verify it. Do you have any idea about turning on the oracle tracing? or
other methods that I can get some useful log info.
Thanks!

【在 z***y 的大作中提到】
: 这可能是rollback 没有完成。 你是不是曾经强制结束过语句?如果是, 你应该等回
: 滚结束。
: 你或者看一下有没有没有提交的transaction.
: 你可以试着在系统不忙的时候再试一次。
: 我不做oracle很久,如果说错了还望见谅。

avatar
c*d
4
举个例子,ora-00054是这样发生的
session A:
update scott.dept set loc='beijing';
然后不commit也不rollback
session B:
alter table scott.dept drop column dname;
ORA-00054: resource busy and acquire with NOWAIT specified
truncate table scott.dept;
ORA-00054: resource busy and acquire with NOWAIT specified

li
NOWAIT
from
hi
pac
t
d

【在 r*t 的大作中提到】
: An urgent problem, thanks a lot if anybody can help!!!
: I have several parallel processes like this:
: my_program parameter1 &
: my_program parameter2 &
: ...
: my_program parametern &
: In most of time, it runs as expected, but sometime it do give me an error li
: ke this:
: "Truncating table TABLE_A, ORA-00054: resource busy and acquire with NOWAIT
: specified"

avatar
c*d
5
想追踪什么语句导致ora-00054,可以这么做
alter system set events='54 trace name errorstack forever, level 10'
这样当发生ora-00054的时候,会在udump目录产生一个trace文件
比如下面的的这个trace文件说明是truncate操作导致ora-00054
********************************************************
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = #############
System name: Linux
Node name: #############
Release: 2.4.20-8smp
Version: #1 SMP Thu Mar 13 17:45
avatar
B*g
6
ding

【在 c*****d 的大作中提到】
: 想追踪什么语句导致ora-00054,可以这么做
: alter system set events='54 trace name errorstack forever, level 10'
: 这样当发生ora-00054的时候,会在udump目录产生一个trace文件
: 比如下面的的这个trace文件说明是truncate操作导致ora-00054
: ********************************************************
: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
: With the Partitioning, OLAP and Data Mining options
: ORACLE_HOME = #############
: System name: Linux
: Node name: #############

avatar
k*t
7
Why don't you check v$session and v$sql to find out session holding
table_A when ora-54 occurs.

li
NOWAIT

【在 r*t 的大作中提到】
: An urgent problem, thanks a lot if anybody can help!!!
: I have several parallel processes like this:
: my_program parameter1 &
: my_program parameter2 &
: ...
: my_program parametern &
: In most of time, it runs as expected, but sometime it do give me an error li
: ke this:
: "Truncating table TABLE_A, ORA-00054: resource busy and acquire with NOWAIT
: specified"

avatar
c*d
8
估计他是晚上执行批处理,人不在
所以可以写个event trigger把v$session, v$sql记录下来
第二天再看
不过hold table_A的应该都是他的my_program

error

【在 k******t 的大作中提到】
: Why don't you check v$session and v$sql to find out session holding
: table_A when ora-54 occurs.
:
: li
: NOWAIT

avatar
r*t
9
Thank you very much! It really helps! Now I found where is the problem.
Thanks again!

【在 c*****d 的大作中提到】
: 想追踪什么语句导致ora-00054,可以这么做
: alter system set events='54 trace name errorstack forever, level 10'
: 这样当发生ora-00054的时候,会在udump目录产生一个trace文件
: 比如下面的的这个trace文件说明是truncate操作导致ora-00054
: ********************************************************
: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
: With the Partitioning, OLAP and Data Mining options
: ORACLE_HOME = #############
: System name: Linux
: Node name: #############

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。