Unix Technical Forum

How to find Column name - ORA-01438: value larger than specified precision allows

This is a discussion on How to find Column name - ORA-01438: value larger than specified precision allows within the Oracle Database forums, part of the Database Server Software category; --> Hello I have a very large table with many columns that can cause this. Input is coming through external ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-24-2008, 04:24 PM
goyald@gmail.com
 
Posts: n/a
Default How to find Column name - ORA-01438: value larger than specified precision allows

Hello
I have a very large table with many columns that can cause this. Input
is coming through external application integration and we do not have
control on code that inserts data in our table. We can however change
precision in the table.

Problem is that I can not find a way to get name of offending column.
Are their any suggestions?


Regards

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-24-2008, 04:24 PM
Andy Hassall
 
Posts: n/a
Default Re: How to find Column name - ORA-01438: value larger than specified precision allows

On 14 Sep 2005 13:31:31 -0700, goyald@gmail.com wrote:

>I have a very large table with many columns that can cause this. Input
>is coming through external application integration and we do not have
>control on code that inserts data in our table. We can however change
>precision in the table.
>
>Problem is that I can not find a way to get name of offending column.
>Are their any suggestions?


What's the data loaded with? There's a way to highlight the column, at least
within the SQL statement; here's an example via SQL*Plus.

SQL> create table t (c1 number(4), c2 number(4));

Table created.

SQL> insert into t values (9999, 99999);
insert into t values (9999, 99999)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column


SQL> insert into t values (99999, 9999);
insert into t values (99999, 9999)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allowed for this column

Note that there is a "*" on the value that broke the datatype constraint.

At the OCI level this comes from the OCI_ATTR_PARSE_ERROR_OFFSET statement
handle attribute, so it's available to any OCI program. Perl's DBD::Oracle will
pick this up, too.

If it's acceptable to have to run it past a human to find the problem then
this could work. Can't think of a more direct method that doesn't involve you
basically re-inventing the validation rules in code somewhere.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-24-2008, 04:25 PM
goyald@gmail.com
 
Posts: n/a
Default Re: How to find Column name - ORA-01438: value larger than specified precision allows

Thanks for the reply. I should have explained my question further.

Error message is
*More text here * exception occurred in
ORA9IDynamicSql:penCursor(StmtExecute)
ORA-01438: value larger than specified precision allows for this
column

As you will notice, this is a dynamic SQL that gets built somewhere in
program, (from input XML sent by external system), program than tries
to insert/update database. It does not happen often but only sometimes
- when sender system sends data with more precision to our system.

If I can get capture offending SQL than I can try comparing data
fields. I am looking for some suggestions to find this column from
database logs/trace files etc.
thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-24-2008, 04:27 PM
Maxim Demenko
 
Posts: n/a
Default Re: How to find Column name - ORA-01438: value larger than specifiedprecision allows

goyald@gmail.com schrieb:
> Thanks for the reply. I should have explained my question further.
>
> Error message is
> *More text here * exception occurred in
> ORA9IDynamicSql:penCursor(StmtExecute)
> ORA-01438: value larger than specified precision allows for this
> column
>
> As you will notice, this is a dynamic SQL that gets built somewhere in
> program, (from input XML sent by external system), program than tries
> to insert/update database. It does not happen often but only sometimes
> - when sender system sends data with more precision to our system.
>
> If I can get capture offending SQL than I can try comparing data
> fields. I am looking for some suggestions to find this column from
> database logs/trace files etc.
> thanks
>


You may be interesting in tracing the session with event 10046 at level
4 or 12. In that case you will find in trace file the error 01438 as
well as SQL and inserted values. You can enable tracing for certain user
via logon trigger ( http://www.evdbt.com/trclvl12.ddl ).

Best regards

Maxim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-24-2008, 04:28 PM
goyald@gmail.com
 
Posts: n/a
Default Re: How to find Column name - ORA-01438: value larger than specified precision allows

Thanks

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:29 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com