aspose file tools*
The moose likes JDBC and the fly likes some value too large for some column and getting a SQL trace from Oracle, a 30 year old database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "some value too large for some column and getting a SQL trace from Oracle, a 30 year old database" Watch "some value too large for some column and getting a SQL trace from Oracle, a 30 year old database" New topic
Author

some value too large for some column and getting a SQL trace from Oracle, a 30 year old database

Chris Twigt
Greenhorn

Joined: Jan 16, 2009
Posts: 2
Hi,

I'm using WebLogic 10 and Oracle 10.
I'm getting an error message from Oracle saying nothing more than something like this:

"some value is too large for some column in some table. There is some precision problem".

There is no information about the value that I'm trying to insert/update.
There is no information about the column I try to insert/update.
There is no information about the table I try to insert/update.
There is no information about the SQL statement I try to execute.

All of this information is probably available in the Oracle code that throws this error message,
but the programmer that programmed that part apparently decided to not supply this information,
nor did any of his colleagues - over the past 30 years - decide that this error message is
begging to be patched.

The error comes out of the Oracle JDBC driver when I try to execute a SELECT statement.
It triggers a batch statement that is apparently delayed. It is triggered by 1 of several
thousands of SQL statements and I need to get a SQL trace.

How do I get a trace of SQL statements from Oracle? I'd guess that by now,
that is a matter of simply flipping a switch in Oracle. But somehow I get the
feeling that I'm hitting another 30-year maintenance-deprived area of Oracle...

Can anyone help me get a SQL trace from Oracle the easy way?

Regards,
Chris





Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Very simply:

will turn on SQL tracing for a session. Oracle trace will (still) not tell you the column which has the precision error.

The error number is important, you get different error numbers for precision errors on different data types.

Since you (presumably) have the source of your on select trigger and the SQL of your select statament it might just be easier to go through them by hand.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Chris Twigt
Greenhorn

Joined: Jan 16, 2009
Posts: 2
I get your point. I'd need to get that statement as the first statement to Oracle from my application, right ?

But the credentials that I use in my connection pool do not allow me to execute that statement.
And rightfully so, security is okay. However, even if my credentials do have enough rights to
execute the statement, where do I find the logging output and will it contain - next to the queries -
the values that are inserted/updated ?

Regards,
Chris



 
wood burning stoves
 
subject: some value too large for some column and getting a SQL trace from Oracle, a 30 year old database
 
Similar Threads
Transaction or Table Locking?
SQL injection?
Optimistic concurrency in hibernate using version/timestamp.
executeUpdate Error
How to Determine Whether to Insert or Update