oracle 甲骨文错误信息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6628856/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:07:42  来源:igfitidea点击:

Oracle error messages

javaoracleoracle11g

提问by Bryan James

I'm curious about something... is it possible for an Oracle 11 instance to be configured so that it does not return any ORA-?????? error messages?

我对某些事情感到好奇……是否可以配置 Oracle 11 实例使其不返回任何 ORA-?????? 错误信息?

I've issued many invalid queries where I've misspelled column names, table names... things where I would expect an ORA error message.

我发出了许多无效的查询,其中我拼错了列名、表名……我希望出现 ORA 错误消息的地方。

Say for security purposes say if a stray java stack trace got exposed to a browser could you force oracle to always show the same bogus error message in the stack trace?

出于安全目的说,如果一个杂散的 Java 堆栈跟踪暴露给浏览器,您是否可以强制 oracle 始终在堆栈跟踪中显示相同的虚假错误消息?

I always get this one:java.sql.SQLException: IO Error: Size Data Unit (SDU) mismatch

我总是得到这个:java.sql.SQLException: IO Error: Size Data Unit (SDU) mismatch

I've googled that error up and down, and I do not have any connection or database configuration issues at all! I get it on a per-query basis.

我在谷歌上搜索了那个错误,我根本没有任何连接或数据库配置问题!我是在每个查询的基础上获取的。

采纳答案by pierus

Not a direct solution but I was having the same problem with the SDU mismatch masking the real error. I found a link (http://www.rajivnarula.com/blog/2013/03/13/table-not-found-or-error-not-found/) that gave an indirect way to expose the error:

不是直接的解决方案,但我遇到了同样的问题,即 SDU 不匹配掩盖了真正的错误。我找到了一个链接(http://www.rajivnarula.com/blog/2013/03/13/table-not-found-or-error-not-found/),它提供了一种间接暴露错误的方法:

I tried swapping the JDBC driver with the older ojdbc14.jar and voila ! The real error was exposed : Good old

ORA-00942 (table or view does not exist)

Once I put the table in- everything works fine- with ojdbc14.jar as well ojdbc6.jar

我尝试用旧的 ojdbc14.jar 交换 JDBC 驱动程序,瞧!真正的错误暴露了:好老

ORA-00942(表或视图不存在)

一旦我将表放入 - 一切正常 - ojdbc14.jar 以及 ojdbc6.jar

Obviously a pain but useful until someone posts a way to get the underlying error with the newer driver...

显然很痛苦但很有用,直到有人发布了一种方法来获取较新的驱动程序的潜在错误......

回答by steve

Basically your setup is not correct. Either on the client or on the server or on both the sdu size has been set and they do not match between client and server. The sdu size can be set on the client in

基本上你的设置不正确。在客户端或服务器上或两者上都设置了 sdu 大小并且它们在客户端和服务器之间不匹配。sdu 大小可以在客户端设置

  • the sqlnet.orafile or
  • in the connect descriptor
  • sqlnet.ora文件或
  • 在连接描述符中

On the server it can be set with

在服务器上它可以设置为

  • in the sqlnet.orafile
  • the dispatchers init.oraparameter
  • or the listener.orafile.
  • sqlnet.ora文件中
  • 调度程序init.ora参数
  • listener.ora文件。

If you are still not convinced, trace the tns traffic to verify this. Client side tracing can be enabled by adding the following settings to the sqlnet.orafile:

如果您仍然不相信,请跟踪 tns 流量以验证这一点。可以通过将以下设置添加到sqlnet.ora文件来启用客户端跟踪:

trace_level_client = 10
trace_unique_client = on
trace_file_client = sqlnet.trc
trace_directory_client = <path_to_trace_dir>

Server side settings can be enabled with the following settings:

可以使用以下设置启用服务器端设置:

trace_level_server = 10
trace_file_server = server.trc
trace_directory_server = <path_to_trace_dir>

If level 10is not sufficient, set the level to 16. This will create a trace file that you can analyze.

如果级别10不够,请将级别设置为16。这将创建一个您可以分析的跟踪文件。

回答by Emil Prager

You can try to upgrade the Oracle 11g JDBC driver to a version greater than 11.2.0.3.0, as described here

您可以尝试到的Oracle 11g JDBC驱动程序升级到版本大于11.2.0.3.0,描述在这里

回答by user3715927

There is another chance whether the table in the query exists in the database or not. Check for table name in the query or try whether you are trying for Oracle Database using mysql driver

查询中的表是否存在于数据库中还有另一个机会。检查查询中的表名或尝试是否使用 mysql 驱动程序尝试 Oracle 数据库