开发者

Oracle error messages

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?

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

Say for secu开发者_JAVA百科rity 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?

I always get this one: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.


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:

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

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


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

  • the sqlnet.ora file or
  • in the connect descriptor

On the server it can be set with

  • in the sqlnet.ora file
  • the dispatchers init.ora parameter
  • or the listener.ora file.

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.ora file:

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 10 is not sufficient, set the level to 16. This will create a trace file that you can analyze.


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜