Question: I received the following error message:
ERROR ORA-12899: value too large for column
I am working with the following settings:
NLS_LANGUAGE = HEBREW
NLS_TERRITORY = ISRAEL
NLS_CHARACTERSET-AL32UTF8
NLS_NCHAR_CHARACTERSET -AL16UTF16
How do I resolve this error
ORA-12899: value too large for column?
Answer:
To diagnose any error, you start by using the
oerr utility to display the ORA-12899 error:
ORA-12899: value too large for column string (actual: string, maximum: string)
Cause: An attempt was made to insert or update a column with a value which is
too wide for the width of the destination column. The name of the column is
given, along with the actual width of the value, and the maximum allowed width
of the column. Note that widths are reported in characters if character length
semantics are in effect for the column, otherwise widths are reported in bytes.
Action: Examine the SQL statement for correctness. Check source and destination
column data types. Either make the destination column wider, or use a subset of
the source column (i.e. use substring).
Second, you should be aware that the full ORA-12899 message is needed in order
for you to get helpful feedback. According to Oracle, the ORA-12899 error
is reported in the following format:
ORA-12899: value too large for column string (actual: string, maximum:
string)
Therefore, your actual resulting ORA-12899 error message should look
something like this:
ORA-12899: value too large for column AUTHOR_LASTNAME (actual: 22, maximum: 20)
Although your question does not reveal much about what you were
trying to do, the resulting ORA-12899 does! The usual suspects
to check are:
- SQL statements to make sure they're correct
- Source and destination column data types to make sure they
are compatible
- Destination column width to make sure it's large enough for
your largest expected value
If all of that checks out, you can try again and let us know more
about the process and the error you're getting.
Bugs causing ORA-12899
When getting an ORA-12899 on a virtual column, see
MOSC:
MOSC Note
1599351.1 titled "ORA-12899: Value Too Large For Column when
using Deterministic Function".
MOSC Note 1516303.1 titled
"ORA-12899 Creating a Table With Virtual Columns".
MOSC bugs 16066239 and 13640613.
Also see
MOSC
Notes 752716.1 and 5868257.8:
See bug 5172797, bug 15835753
and bug 8211083 titled "GETTING ORA-12899 INTERMITTENTLY, WHILE
INSERT/UPDATE ON DATE TYPE COLUMN"
|
|
Get the Complete
Oracle SQL Tuning Information
The landmark book
"Advanced Oracle
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
buy it
for 30% off directly from the publisher.
|