Download Error due to inappropriate column values

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
SAP Note
591600 - Error due to inappropriate column values
Version 10 Validity: 13.04.2006 - active Language English
Header Data
Released On 13.04.2006 09:36:24
Release Status Released for Customer
Component
BC-DB-ORA Oracle
Priority
Recommendations / Additional Info
Category
Help for error analysis
Symptom
ORA-01401: inserted value too large for column
ORA-01406: fetched column value was truncated
ORA-01426: numeric overflow
ORA-01438: value larger than specified precision allows for this column
ORA-01455: converting column overflows integer datatype
ORA-01722: invalid number
ORA-12899: value too large for column <owner>.<table>.<column>
(actual: <data_len>, maximum: <defined_len>)
Most of these errors are reported in a DBIF_RSQL_SQL_ERROR dump.
Other Terms
DBIF_RSQL_SQL_ERROR
Reason and Prerequisites
If you try to fill a column of a table with an entry that does not fit or if you try to read a
column in a variable that is too small, Oracle terminates with one of the above errors. In detail,
the error messages mean the following:
l
ORA-01401, ORA-12899: You want to write a string to a table, but the string contains more
characters than the column definition allows.
SQL> create table test (text varchar(3));
Table created.
SQL> insert into test values ('bbbb');
insert into test values ('bbbb')
*
ERROR at line 1:
ORA-01401: inserted value too large for column
l
l
ORA-01406: A table column contains a value that cannot be converted to the type defined on the
application on a 1:1 basis.
ORA-01426: You want to write a number to a table, but the number is larger than the displayable
area.
SQL> create table test (zahl integer);
Table created.
SQL> insert into test values(9999...9999);
insert into test values(9999...9999)
*
ERROR at line 1:
ORA-01426: numeric overflow
l
ORA-01438: You want to write a number to a table, but the number has more whole number places
than the column definition allows.
SQL> create table test (zahl number(4,2));
Table created.
SQL> insert into test values(123);
insert into test values(123)
*
ERROR at line 1:
ORA-01438: value larger than specified precision allows for this column
Here, a column was defined with four places, but including two decimal places. Therefore
it is not possible to use more than two whole number places. ORA-01438 therefore occurs with numbers
greater than or equal to 100.
However, if more than two decimal places were specified, Oracle rounds off automatically
and no error would occur.
l
ORA-01455: In the context of a SELECT, you try to transfer the content of a column to an integer
variable where the content of the column disrupts the integer number area.
l
ORA-01722: You want to write a non-number to a number column.
SQL> create table test (zahl number(4,2));
Table created.
SQL> insert into test values('aa');
insert into test values('aa')
*
ERROR at line 1:
ORA-01722: invalid number
If such errors occur in R/3, this is NOT usually caused by an Oracle problem, but rather an
application problem. Nevertheless, possible causes and notes concerning troubleshooting should be
given at this point.
Solution
To solve the problem, proceed as follows:
1. Determine on which table the error has occurred during your access. If a short dump has been
written, you will find the table name there (for example, in the "Internal call source code"
entry). Alternatively, you can use syslog entries to determine the name (transaction SM21).
Often there is also detailed information on the error in the relevant developer trace of the
work process (transaction ST11).
2. If the error occurs during the execution of external tools such as sapdba, you will usually
find the table names in the relevant log files.
3. Since many such problems are triggered by application-based causes, try to find SAP notes
containing the error code (for example ORA-01438) and the table name. If you are unsuccessful
here, use only the error code to search for suitable notes. In many cases, you can solve the
problem with a relevant note.
In this case, "application-based" includes R/3 Basis and external tools such as sapdba, since
these also represent an application from the Oracle perspective.
4. Another frequent cause is an inconsistency between R/3 Data Dictionary and the table
definitions at Oracle level. You should therefore use transaction SE11 or SE14 to check the
consistency of the database and runtime object of the affected table. If you discover
inconsistencies here, you must first determine the cause (for example, a terminated conversion).
The inconsistencies must then be corrected using suitable measures. As soon as the database and
runtime object are consistent, you can check whether the previous error is also eliminated.
5. If the previous steps have not helped, you must determine the exact SQL statement that caused
the termination. You can do this by creating an SQL trace, for instance:
a) Use transaction ST05 to activate an SQL trace. You can restrict this to the relevant R/3
user and the affected table to retain a clear overview of the data in question.
b) Reproduce the error on the application server on which you started the SQL trace.
c) Stop the SQL trace with transaction ST05.
d) Display the SQL trace with transaction ST05. An access to the affected table should now
be logged there, ending with the relevant error number. At the same time, you receive a
message telling you which actual column values are to be written to or from the database.
6. You can now compare this information with the column definition of the table in transaction
SE11. Generally you will find a discrepancy here and you can eliminate the actual cause in the
application.
7. In rare cases, an error such as ORA-01455 or ORA-01438 can also be triggered by
inconsistencies in Oracle. You should therefore use "ANALYZE TABLE" to check the affected table
in accordance with note 23345 (caution: the table is locked exclusively). If an error such as
ORA-01499 occurs here, it is responsible for ORA-01438 and must be eliminated according to Note
365481.
8. If ORA-01438 occurs on UNIX even though you cannot detect any discrepancies, the problem may
also be caused by a bug in the Oracle client software. See Note 554266 for information.
9. If an ORA-01455 error only occurs when you use transactions SE16 or SE11 to access certain
tables (for example, D020L), this is generally not an error. In fact, SE16 and SE11 are not
intended to be used to display any table contents. If error ORA-01455 occurs when you use these
transactions, you must access the required table contents in another way (for example, using
Oracle tools such as SQLPLUS).
Validity
This document is not restricted to a software component or software component version
References
This document refers to:
SAP Notes
1102641 Consult: Dump during insert in PSA table due to incorr vals
821529 Update termination with option rate determination
554266 ORA-1438, for example, when loading an InfoCube
365481 Block corruptions
23345 Consistency check of ORACLE database
This document is referenced by:
SAP Notes (5)
23345 Consistency check of ORACLE database
365481 Block corruptions
821529 Update termination with option rate determination
1102641 Consult: Dump during insert in PSA table due to incorr vals
554266 ORA-1438, for example, when loading an InfoCube