Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Chris Twigt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Chris Twigt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic