gpt4 book ai didi

sql - 更新语句导致Oracle "No more data to read from socket"?

转载 作者:行者123 更新时间:2023-12-02 08:55:10 25 4
gpt4 key购买 nike

我对表有一个有点简单的UPDATE...WHERE EXISTS...。然而,Oracle(通过所有其他客户端工具)立即(无延迟)返回 ORA-03113,表明可能存在连接问题等。我直接在数据库框上运行它。

此实例已启动、正在运行且运行良好。我可以发出任何 SQL 和复杂的过程,并且数十种模式都可以运行。这只是一个特定的 SQL 语句。

可能是什么?如何找出?

$ sqlplus user/pass    
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 28 13:04:38 2011

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from dual;

D
-
X

SQL> update foo_a a
2 set a.field0 = (
3 select b.bar
4 from foo_b b
5 where b.custom_no = 0
6 and b.csf_id = a.id
7 ) , a.updated_on = current_timestamp
9 where exists (
8 select 1
10 from foo_b c
11 where c.custom_no = 0
12 and c.csf_id = a.id
13 );
update foo_a a
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel


SQL>

最佳答案

Oracle 数据库非常很少真正崩溃。 session 可能被终止或断开连接,但数据库仍保持运行。

这表明 Oracle 在处理查询时存在错误。通常,可以在跟踪文件中找到有问题的查询。有时警报日志中也会有有用的消息以及附加错误代码。如果您在跟踪文件中找到查询,有时您可以在 Metalink 中查找错误。在跟踪文件中,您可能会发现如下行:

ksedmp: internal or fatal error

随后是 Oracle 错误,然后是导致问题的实际查询。对于您的情况,上述消息很可能会有所不同。只需在其中查找指示错误的消息即可。它们确实不难发现。

你能重写你的更新语句吗?这是测试环境吗?您能否消除 WHERE EXISTS 并用一个简单的表达式替换它,看看这是否是问题的根源?

关于sql - 更新语句导致Oracle "No more data to read from socket"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5464842/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com