ORA-01401 and ORA-12899 : "too large for column" error messages

I posted this already in the Database - General forum.
Sorry for the double post.
For the past 8hours, I have been googling about
the related ORA-01401 and ORA-12899 error
messages.
I noticed that ORA-01401 had been removed from the list
of error messages in Oracle 10g documentation.
http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10744/e900.htm#sthref30
And, ORA-12899 has been added.
http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10744/e12700.htm
1. Is there an official Oracle document (e.g. release notes) stating such facts? If so, please provide the link.
2. Why did Oracle change the error code and not just update ORA-01401?
3. Someone posted in http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7143933880166
Even if installed Oracle is 10g, when he tried to "insert a 100 into a number(2).",
he supposedly got ORA-01401. So, is ORA-01401 still part of 10g or not?
I have yet to confirm this myself.
Sorry for being meticulous. Our customer just wants to know the
information for the 2nd question. It's hard to convince them without
showing official documents.
Thanks!

1)
Well, go to Metalink and check out Note 119119.1 (B.4) and Note:287754.1
2)
Such details are seldom published. One guess is what they changed altered the reason behind the message so using the same code would be a bad idea.
3)
If you are referring to the occurrence of ora-1401 from a select on a XE db, that may be a bug.

Similar Messages

  • Data Profiling - Value too large for column error

    I am running a data profile which completes with errors. The error being reported is an ORA 12899 Value too large for column actual (41 maximum 40).
    I have checked the actual data in the table and the maximum is only 40 characters.
    Any ideas on how to solve this. Even though it completes no actual profile is done on the data due to the error.
    OWB version 11.2.0.1
    Log file below.
    Job     Rows Selected     Rows Inserted     Rows Updated     Rows Deleted     Errors     Warnings     Start Time     Elapsed Time     
    Profile_1306385940099                                   2011-05-26 14:59:00.0     106     
    Data profiling operations complete.                                             
    Redundant column analysis for objects complete in 0 s.                                              
    Redundant column analysis for objects.                                              
    Referential analysis for objects complete in 0.405 s.                                              
    Referential analysis for objects.                                              
    Referential analysis initialization complete in 8.128 s.                                             
    Referential analysis initialization.                                             
    Data rule analysis for object TABLE_NAME complete in 0 s.                                             
    Data rule analysis for object TABLE_NAME                                             
    Functional dependency and unique key discovery for object TABLE_NAME complete in 0 s.                                             
    Functional dependency and unique key discovery for object TABLE_NAME                                             
    Domain analysis for object TABLE_NAME complete in 0.858 s.                                             
    Domain analysis for object TABLE_NAME                                             
    Pattern analysis for object TABLE_NAME complete in 0.202 s.                                             
    Pattern analysis for object TABLE_NAME                                             
    Aggregation and Data Type analysis for object TABLE_NAME complete in 9.236 s.                                             
    Aggregation and Data Type analysis for object TABLE_NAME                                             
    Functional dependency and unique key discovery for object TABLE_NAME complete in 0 s.                                             
    Functional dependency and unique key discovery for object TABLE_NAME                                             
    Domain analysis for object TABLE_NAME complete in 0.842 s.                                             
    Domain analysis for object TABLE_NAME                                             
    Pattern analysis for object TABLE_NAME complete in 0.187 s.                                             
    Pattern analysis for object TABLE_NAME                                             
    Aggregation and Data Type analysis for object TABLE_NAME complete in 9.501 s.                                             
    Aggregation and Data Type analysis for object TABLE_NAME                                             
    Functional dependency and unique key discovery for object TABLE_NAME complete in 0 s.                                             
    Functional dependency and unique key discovery for object TABLE_NAME                                             
    Domain analysis for object TABLE_NAME complete in 0.717 s.                                             
    Domain analysis for object TABLE_NAME                                             
    Pattern analysis for object TABLE_NAME complete in 0.156 s.                                             
    Pattern analysis for object TABLE_NAME                                             
    Aggregation and Data Type analysis for object TABLE_NAME complete in 9.906 s.                                             
    Aggregation and Data Type analysis for object TABLE_NAME                                             
    Functional dependency and unique key discovery for object TABLE_NAME complete in 0 s.                                             
    Functional dependency and unique key discovery for object TABLE_NAME                                             
    Domain analysis for object TABLE_NAME complete in 0.827 s.                                             
    Domain analysis for object TABLE_NAME                                             
    Pattern analysis for object TABLE_NAME complete in 0.187 s.                                             
    Pattern analysis for object TABLE_NAME                                             
    Aggregation and Data Type analysis for object TABLE_NAME complete in 9.172 s.                                             
    Aggregation and Data Type analysis for object TABLE_NAME                                             
    Functional dependency and unique key discovery for object TABLE_NAME complete in 0 s.                                             
    Functional dependency and unique key discovery for object TABLE_NAME                                             
    Domain analysis for object TABLE_NAME complete in 0.889 s.                                             
    Domain analysis for object TABLE_NAME                                             
    Pattern analysis for object TABLE_NAME complete in 0.202 s.                                             
    Pattern analysis for object TABLE_NAME                                             
    Aggregation and Data Type analysis for object TABLE_NAME complete in 9.313 s.                                             
    Aggregation and Data Type analysis for object TABLE_NAME                                             
    Execute data prepare map for object TABLE_NAME complete in 9.267 s.                                             
    Execute data prepare map for object TABLE_NAME                                             
    Execute data prepare map for object TABLE_NAME complete in 10.187 s.                                             
    Execute data prepare map for object TABLE_NAME                                             
    Execute data prepare map for object TABLE_NAME complete in 8.019 s.                                             
    Execute data prepare map for object TABLE_NAME                                             
    Execute data prepare map for object TABLE_NAME complete in 5.507 s.                                             
    Execute data prepare map for object TABLE_NAME                                             
    Execute data prepare map for object TABLE_NAME complete in 10.857 s.                                             
    Execute data prepare map for object TABLE_NAME                                             
    Parameters                                             
    O82647310CF4D425C8AED9AAE_MAP_ProfileLoader                              1     2011-05-26 14:59:00.0     11     
    ORA-12899: value too large for column "SCHEMA"."O90239B0C1105447EB6495C903678"."ITEM_NAME_1" (actual: 41, maximum: 40)                                             
    Parameters                                             
    O68A16A57F2054A13B8761BDC_MAP_ProfileLoader                              1     2011-05-26 14:59:11.0     5     
    ORA-12899: value too large for column "SCHEMA"."O0D9332A164E649F3B4D05D045521"."ITEM_NAME_1" (actual: 41, maximum: 40)                                             
    Parameters                                             
    O78AD6B482FC44D8BB7AF8357_MAP_ProfileLoader                              1     2011-05-26 14:59:16.0     9     
    ORA-12899: value too large for column "SCHEMA"."OBF77A8BA8E6847B8AAE4522F98D6"."ITEM_NAME_2" (actual: 41, maximum: 40)                                             
    Parameters                                             
    OA79DF482D74847CF8EA05807_MAP_ProfileLoader                              1     2011-05-26 14:59:25.0     10     
    ORA-12899: value too large for column "SCHEMA"."OB0052CBCA5784DAD935F9FCF2E28"."ITEM_NAME_1" (actual: 41, maximum: 40)                                             
    Parameters                                             
    OFFE486BBDB884307B668F670_MAP_ProfileLoader                              1     2011-05-26 14:59:35.0     9     
    ORA-12899: value too large for column "SCHEMA"."O9943284818BB413E867F8DB57A5B"."ITEM_NAME_1" (actual: 42, maximum: 40)                                             
    Parameters

    Found the answer. It was the database character set for multi byte character sets.

  • Update trigger fails with value too large for column error on timestamp

    Hello there,
    I've got a problem with several update triggers. I've several triggers monitoring a set of tables.
    Upon each update the updated data is compared with the current values in the table columns.
    If different values are detected the update timestamp is set with the current_timestamp. That
    way we have a timestamp that reflects real changes in relevant data. I attached an example for
    that kind of trigger below. The triggers on each monitored table only differ in the columns that
    are compared.
    CREATE OR REPLACE TRIGGER T_ava01_obj_cont
    BEFORE UPDATE on ava01_obj_cont
    FOR EACH ROW
    DECLARE
      v_changed  boolean := false;
    BEGIN
      IF NOT v_changed THEN
        v_changed := (:old.cr_adv_id IS NULL AND :new.cr_adv_id IS NOT NULL) OR
                     (:old.cr_adv_id IS NOT NULL AND :new.cr_adv_id IS NULL)OR
                     (:old.cr_adv_id IS NOT NULL AND :new.cr_adv_id IS NOT NULL AND :old.cr_adv_id != :new.cr_adv_id);
      END IF;
      IF NOT v_changed THEN
        v_changed := (:old.is_euzins_relevant IS NULL AND :new.is_euzins_relevant IS NOT NULL) OR
                     (:old.is_euzins_relevant IS NOT NULL AND :new.is_euzins_relevant IS NULL)OR
                     (:old.is_euzins_relevant IS NOT NULL AND :new.is_euzins_relevant IS NOT NULL AND :old.is_euzins_relevant != :new.is_euzins_relevant);
      END IF;
    [.. more values being compared ..]
        IF v_changed THEN
        :new.update_ts := current_timestamp;
      END IF;
    END T_ava01_obj_cont;Really relevant is the statement
    :new.update_ts := current_timestamp;So far so good. The problem is, it works the most of time. Only sometimes it fails with the following error:
    SQL state [72000]; error code [12899]; ORA-12899: value too large for column "LGT_CLASS_AVALOQ"."AVA01_OBJ_CONT"."UPDATE_TS"
    (actual: 28, maximum: 11)
    I can't see how the value systimestamp or current_timestamp (I tried both) should be too large for
    a column defined as TIMESTAMP(6). We've got tables where more updates occur then elsewhere.
    Thats where the most of the errors pop up. Other tables with fewer updates show errors only
    sporadicly or even never. I can't see a kind of error pattern. It's like that every 10.000th update
    or less failes.
    I was desperate enough to try some language dependend transformation like
    IF v_changed THEN
        l_update_date := systimestamp || '';
        select value into l_timestamp_format from nls_database_parameters where parameter = 'NLS_TIMESTAMP_TZ_FORMAT';
        :new.update_ts := to_timestamp_tz(l_update_date, l_timestamp_format);
    END IF;to be sure the format is right. It didn't change a thing.
    We are using Oracle Version 10.2.0.4.0 Production.
    Did anyone encounter that kind of behaviour and solve it? I'm now pretty certain that it has to
    be an oracle bug. What is the forum's opinion on that? Would you suggest to file a bug report?
    Thanks in advance for your help.
    Kind regards
    Jan

    Could you please edit your post and use formatting and tags.  This is pretty much unreadable and the forum boogered up some of your code.
    Instructions are here: http://forums.oracle.com/forums/help.jspa                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Inserted value too large for column error while scheduling a job

    Hi Everyone,
    I am trying to schedule a PL SQL script as a job in my Oracle 10g installed and running on Windows XP.
    While trying to Submit the job I get the error as "Inserted value too large for column:" followed by my entire code. The code is correct - complies and runs in Oracle ApEx's SQL Workshop.
    The size of my code is 4136 character, 4348 bytes and 107 lines long. It is a code that sends an e-mail and has a +utl_smtp.write_data([Lots of HTML])+
    There is no insert statement in the code whatsoever, the code only queries the database for data...
    Any idea as to why I might be getting this error??
    Thanks in advance
    Sid

    The size of my code is 4136 character, 4348 bytes and 107 lines long. It is a code that sends an e-mail and has a utl_smtp.write_data(Lots of HTML)SQL variable has maximum size of 4000

  • Inserted value too large for column Error

    I have this table:
    CREATE TABLE SMt_Session
         SessionID int NOT NULL ,
         SessionUID char (36) NOT NULL ,
         UserID int NOT NULL ,
         IPAddress varchar2 (15) NOT NULL ,
         Created timestamp NOT NULL ,
         Accessed timestamp NOT NULL ,
         SessionInfo nclob NULL
    and this insert from a sp (sp name is SMsp_SessionCreate):
         Now := (SYSDATE);
         SessionUID := SYS_GUID();
         /*create the session in the session table*/
         INSERT INTO SMt_Session
                   ( SessionUID ,
                   UserID ,
                   IPAddress ,
                   Created ,
                   Accessed )
         VALUES           ( SMsp_SessionCreate.SessionUID ,
                   SMsp_SessionCreate.UserID ,
                   SMsp_SessionCreate.IPAddress ,
                   SMsp_SessionCreate.Now ,
                   SMsp_SessionCreate.Now );
    It looks like the param SessionUID is the one with trouble, but the length of sys_guid() is 32, and my column has 36.
    IPAddress is passed to the sp with value '192.168.11.11', so it should fit.
    UserID is 1.
    I am confused, what is the column with problem ?

    CREATE OR REPLACE PROCEDURE SMsp_SessionCreate
         PartitionID IN      INT ,
         UserID IN      INT ,
         IPAddress IN      VARCHAR2 ,
         SessionID IN OUT      INT,
         SessionUID IN OUT      CHAR,
         UserName IN OUT      VARCHAR2,
         UserFirst IN OUT      VARCHAR2,
         UserLast IN OUT      VARCHAR2,
         SupplierID IN OUT      INT,
         PartitionName IN OUT      VARCHAR2,
         Expiration IN      INT ,
         RCT1 OUT      GLOBALPKG.RCT1
    AS
         Now DATE;
         SCOPE_IDENTITY_VARIABLE INT;
    BEGIN      
         Now := SYSDATE;
         -- the new Session UID      
         SessionUID := SYS_GUID();
         /*Cleanup any old sessions for this user*/
         INSERT INTO SMt_Session_History
                   ( UserID ,
                   IPAddress ,
                   Created ,
                   LastAccessed ,
                   LoggedOut )
         SELECT
                   UserID,
                   IPAddress,
                   Created,
                   Accessed,
                   TO_DATE(Accessed + (1/24/60 * SMsp_SessionCreate.Expiration))
         FROM SMt_Session
         WHERE     UserID = SMsp_SessionCreate.UserID;
         --delete old     
         DELETE FROM SMt_Session
         WHERE UserID = SMsp_SessionCreate.UserID;
         /*create the session in the session table*/
         INSERT INTO SMt_Session
                   ( SessionUID ,
                   UserID ,
                   IPAddress ,
                   Created ,
                   Accessed )
         VALUES           ( SMsp_SessionCreate.SessionUID ,
                   SMsp_SessionCreate.UserID ,
                   SMsp_SessionCreate.IPAddress ,
                   SMsp_SessionCreate.Now ,
                   SMsp_SessionCreate.Now );
         SELECT SMt_Session_SessionID_SEQ.CURRVAL INTO SMsp_SessionCreate.SessionID FROM dual;
         --SELECT SMt_Session_SessionID_SEQ.CURRVAL INTO SCOPE_IDENTITY_VARIABLE FROM DUAL;
         --get VALUES to return
         SELECT u.AccountName INTO SMsp_SessionCreate.UserName FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.SupplierID INTO SMsp_SessionCreate.SupplierID FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.FirstName INTO SMsp_SessionCreate.UserFirst FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         SELECT u.LastName INTO SMsp_SessionCreate.UserLast FROM SMt_Users u WHERE u.UserID = SMsp_SessionCreate.UserID;
         BEGIN
              FOR REC IN ( SELECT
                   u.AccountName,
                   u.SupplierID,
                   u.FirstName,
                   u.LastName FROM SMt_Users u
         WHERE     UserID = SMsp_SessionCreate.UserID
              LOOP
                   SMsp_SessionCreate.UserName := REC.AccountName;
                   SMsp_SessionCreate.SupplierID := REC.SupplierID;
                   SMsp_SessionCreate.UserFirst := REC.FirstName;
                   SMsp_SessionCreate.UserLast := REC.LastName;
              END LOOP;
         END;
         BEGIN
              FOR REC IN ( SELECT PartitionName FROM SMt_Partitions
         WHERE     PartitionID = SMsp_SessionCreate.PartitionID
              LOOP
                   SMsp_SessionCreate.PartitionName := REC.PartitionName;
              END LOOP;
         END;
         /*retrieve all user roles*/
         OPEN RCT1 FOR
         SELECT RoleID     FROM SMt_UserRoles
         WHERE     UserID = SMsp_SessionCreate.UserID;
    END;
    this is the exact code of the sp. The table definition is this:
    CREATE TABLE SMt_Session
    SessionID int NOT NULL ,
    SessionUID char (36) NOT NULL ,
    UserID int NOT NULL ,
    IPAddress varchar2 (15) NOT NULL ,
    Created timestamp NOT NULL ,
    Accessed timestamp NOT NULL ,
    SessionInfo nclob NULL
    The sp gets executed with this params:
    PARTITIONID := -2;
    USERID := 1;
    IPADDRESS := '192.168.11.11';
    SESSIONID := -1;
    SESSIONUID := NULL;
    USERNAME := '';
    USERFIRST := '';
    USERLAST := '';
    SUPPLIERID := -1;
    PARTITIONNAME := '';
    EXPIRATION := 300;
    if I ran the code inside the procedure in sql+ (not the procedure), it works. when i call the sp i get the error
    inserted value too large for column
    at line 48

  • 'Value too large for column' error in msql

    In my 9ilite database I have a table with a LONG column
    In the documentation it says that a LONG column can hold upto 2 GB data
    However when I try an insert more than 4097 characters into the column I get the error message on insert 'Value too large for column'
    Is this a bug or is the documentation wrong
    or am I doing something wrong ?
    Any help would be much appreciated

    You have run into some bug in handling intermediate results in Oracle 9i Lite. You can by pass the bug as follows in Java.
    public static oracle.lite.poljdbc.BLOB createBlob(Connection conn,
                        byte[] data)
    throws SQLException, IOException
    oracle.lite.poljdbc.BLOB blob = new oracle.lite.poljdbc.BLOB(
    (oracle.lite.poljdbc.OracleConnection)conn);
    OutputStream writer = blob.getBinaryOutputStream();
    writer.write(data);
    writer.flush();
    writer.close();
    return blob;
    public static void insertRow(Connection conn, int num,
                        oracle.lite.poljdbc.BLOB blob)
    throws SQLException
    PreparedStatement ps = conn.prepareStatement(
    "insert into TEST_BLOB values (?, ?)");
    ps.setInt(1, num);
    ps.setBlob(2, blob);
    ps.execute();

  • Adding virtual column: ORA-12899: value too large for column

    I'm using Oracle 11g, Win7 OS, SQL Developer
    I'm trying to add virtual column to my test table, but getting ORA-12899: value too large for column error. Below are the details.
    Can someone help me in this?
    CREATE TABLE test_reg_exp
    (col1 VARCHAR2(100));
    INSERT INTO test_reg_exp (col1) VALUES ('ABCD_EFGH');
    INSERT INTO test_reg_exp (col1) VALUES ('ABCDE_ABC');
    INSERT INTO test_reg_exp (col1) VALUES ('WXYZ_ABCD');
    INSERT INTO test_reg_exp (col1) VALUES ('ABCDE_PQRS');
    INSERT INTO test_reg_exp (col1) VALUES ('ABCD_WXYZ');
    ALTER TABLE test_reg_exp
    ADD (col2 VARCHAR2(100) GENERATED ALWAYS AS (REGEXP_REPLACE (col1, '^ABCD[A-Z]*_')));
    SQL Error: ORA-12899: value too large for column "COL2" (actual: 100, maximum: 400)
    12899. 00000 -  "value too large for column %s (actual: %s, maximum: %s)"
    *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).When I try to select, I'm getting correct results:
    SELECT col1, (REGEXP_REPLACE (col1, '^ABCD[A-Z]*_'))
    FROM test_reg_exp;Thanks.

    Yes RP, it working if you give col2 size >=400.
    @Northwest - Could you please test the same w/o having a regex clause in col2?
    I doubt on the usage of a REGEX in this dynamic col case.
    Refer this (might help) -- http://www.oracle-base.com/articles/11g/virtual-columns-11gr1.php
    Below snippet from above link.... see if this helps...
    >
    Notes and restrictions on virtual columns include:
    Indexes defined against virtual columns are equivalent to function-based indexes.
    Virtual columns can be referenced in the WHERE clause of updates and deletes, but they cannot be manipulated by DML.
    Tables containing virtual columns can still be eligible for result caching.
    Functions in expressions must be deterministic at the time of table creation, but can subsequently be recompiled and made non-deterministic without invalidating the virtual column. In such cases the following steps must be taken after the function is recompiled:
    Constraint on the virtual column must be disabled and re-enabled.
    Indexes on the virtual column must be rebuilt.
    Materialized views that access the virtual column must be fully refreshed.
    The result cache must be flushed if cached queries have accessed the virtual column.
    Table statistics must be regathered.
    Virtual columns are not supported for index-organized, external, object, cluster, or temporary tables.
    The expression used in the virtual column definition has the following restrictions:
    It cannot refer to another virtual column by name.
    It can only refer to columns defined in the same table.
    If it refers to a deterministic user-defined function, it cannot be used as a partitioning key column.
    The output of the expression must be a scalar value. It cannot return an Oracle supplied datatype, a user-defined type, or LOB or LONG RAW.
    >
    Edited by: ranit B on Oct 16, 2012 11:48 PM
    Edited by: ranit B on Oct 16, 2012 11:54 PM

  • Ora-14036 error partition bound too large for column

    Hi All,
    I have a partitioned table on balance_period .. format YYYYMM .
    I am trying to split the PMAX partition but get the errors :-
    > ALTER TABLE ACT_MD_FOREIGNEXCHANGE SPLIT PARTITION ACT_MD_FOREIGNEX_PMAX AT (TO_DATE ('20081201', 'YYYYMMDD))
    2 INTO (PARTITION ACT_MD_FOREIGNEX_200812, PARTITION ACT_MD_FOREIGNEX_PMAX);
    ALTER TABLE ACT_MD_FOREIGNEXCHANGE SPLIT PARTITION ACT_MD_FOREIGNEX_PMAX AT (TO_DATE ('20081201', 'YYYYMMDD))
    ERROR at line 1:
    ORA-01756: quoted string not properly terminated
    > ALTER TABLE ACT_MD_FOREIGNEXCHANGE SPLIT PARTITION ACT_MD_FOREIGNEX_PMAX AT (TO_DATE ('20081201', 'YYYYMMDD'))
    2 INTO (PARTITION ACT_MD_FOREIGNEX_200812, PARTITION ACT_MD_FOREIGNEX_PMAX);
    ALTER TABLE ACT_MD_FOREIGNEXCHANGE SPLIT PARTITION ACT_MD_FOREIGNEX_PMAX AT (TO_DATE ('20081201', 'YYYYMMDD'))
    ERROR at line 1:
    ORA-14036: partition bound value too large for column
    What is the correct format for the AT part of the statement please ?

    I believe that the partition definitions for the other partitions are not the same as the value you gave in your split statement. Check the definitions for the existing partitions.
    14036, 00000, "partition bound value too large for column"
    // *Cause:  Length of partition bound value is longer than that of the
    //          corresponding partitioning column.
    // *Action: Ensure that lengths of high bound values do not exceed those of
    //          corresponding partitioning columnsJohn

  • SQL Error: ORA-12899: value too large for column

    Hi,
    I'm trying to understand the above error. It occurs when we are migrating data from one oracle database to another:
    Error report:
    SQL Error: ORA-12899: value too large for column "USER_XYZ"."TAB_XYZ"."COL_XYZ" (actual: 10, maximum: 8)
    12899. 00000 - "value too large for column %s (actual: %s, maximum: %s)"
    *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).
    The source database runs - Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    The target database runs - Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    The source and target table are identical and the column definitions are exactly the same. The column we get the error on is of CHAR(8). To migrate the data we use either a dblink or oracle datapump, both result in the same error. The data in the column is a fixed length string of 8 characters.
    To resolve the error the column "COL_XYZ" gets widened by:
    alter table TAB_XYZ modify (COL_XYZ varchar2(10));
    -alter table TAB_XYZ succeeded.
    We now move the data from the source into the target table without problem and then run:
    select max(length(COL_XYZ)) from TAB_XYZ;
    -8
    So the maximal string length for this column is 8 characters. To reduce the column width back to its original 8, we then run:
    alter table TAB_XYZ modify (COL_XYZ varchar2(8));
    -Error report:
    SQL Error: ORA-01441: cannot decrease column length because some value is too big
    01441. 00000 - "cannot decrease column length because some value is too big"
    *Cause:   
    *Action:
    So we leave the column width at 10, but the curious thing is - once we have the data in the target table, we can then truncate the same table at source (ie. get rid of all the data) and move the data back in the original table (with COL_XYZ set at CHAR(8)) - without any issue.
    My guess the error has something to do with the storage on the target database, but I would like to understand why. If anybody has an idea or suggestion what to look for - much appreciated.
    Cheers.

    843217 wrote:
    Note that widths are reported in characters if character length
    semantics are in effect for the column, otherwise widths are
    reported in bytes.You are looking at character lengths vs byte lengths.
    The data in the column is a fixed length string of 8 characters.
    select max(length(COL_XYZ)) from TAB_XYZ;
    -8
    So the maximal string length for this column is 8 characters. To reduce the column width back to its original 8, we then run:
    alter table TAB_XYZ modify (COL_XYZ varchar2(8));varchar2(8 byte) or varchar2(8 char)?
    Use SQL Reference for datatype specification, length function, etc.
    For more info, reference {forum:id=50} forum on the topic. And of course, the Globalization support guide.

  • Fdpstp failed due to ora-12899 value too large for column

    Hi All,
    User facing this problem while running the concurrent program.
    the program is complted but with rhis error.
    fdpstp failed due to ora-12899 value too large for column
    Can any one tell me the excat solution for this?
    RDBMS : 10.2.0.3.0
    Oracle Applications : 11.5.10.2

    User facing this problem while running the concurrent program.
    the program is complted but with rhis error.Is this a seeded or custom concurrent program?
    fdpstp failed due to ora-12899 value too large for column
    Can any one tell me the excat solution for this?Was this working before? If yes, any changes been done recently?
    Can other users run the same concurrent program with no issues?
    Please post the contents of the concurrent request log file here.
    Please ask your developer to open the file using Reports Builder and compile the report and run it (if possible) with the same parameters.
    OERR: ORA-12899 value too large for column %s (actual: %s, maximum: %s) [ID 287754.1]
    Thanks,
    Hussein

  • Rs.updateBoolean SQLException: ORA-12899: value too large for column

    Complete error is SQLException: ORA-12899: value too large for column "SMSUSER"."PRUEBA"."VLOGIC" (actual: 4, maximum: 1)
    Let's see the code:
    PreparedStatement ps=null;
    ResultSet rs=null;
    try
    ps=conn.prepareStatement("create table prueba(name varchar2(32),vlogic char(1) not null check(vlogic in (0,1)))");
    ps.execute();
    logger.info("Table created.");
    ps=conn.prepareStatement("insert into prueba (name,vlogic) values ('user01',?)");
    ps.setBoolean(1,true);
    ps.executeUpdate();
    logger.info("Data Inserted.");
    ps=conn.prepareStatement("update prueba set vlogic=? where name=?");
    ps.setBoolean(1,false);
    ps.setString(2,"user01");
    ps.executeUpdate();
    logger.info("Data Updated.");
    ; Till here all runs ok, but if we try to modify vía Resulset.....
    ps=conn.prepareStatement("select vlogic from prueba where name=? for update", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE, ResultSet.CLOSE_CURSORS_AT_COMMIT);
    ps.setString(1,"user01");
    rs=ps.executeQuery();
    if (rs.next())
    logger.info("Got record.");
    rs.updateBoolean("vlogic",true);
    rs.updateRow();
    logger.info("Column updated.");
    catch (SQLException E)
    logger.info("SQLException: "+E.getMessage());
    finally
    closeResultSet(rs);
    closePreparedStatement(ps);
    The trouble is that when updating via resultset, what is going to be inserted is "true" or "false" and not "0" or "1" as with insertions and modifications via preparedStatements.
    So systems returns error: SQLException: ORA-12899: value too large for column "SMSUSER"."PRUEBA"."VLOGIC" (actual: 4, maximum: 1)
    Cause it is tryng to insert "true".
    Can somebody tell me what's happenign here?
    Thanks in advance.
    Francisco Javier Ascanio Suárez.
    E-mail: [email protected]

    Ok, but why is this behaviour different in ResultSet statements than in Prepared Statements?
    As you can see in my example, prepared statements with set boolean runs ok.
    I like your "proper way", and it resolves my trouble, but it don't tells me why do I have to program a field update in different ways depending of Prepared Statements or updating resultsets.
    Thanks in advance.

  • Imp/exp ORA-12899: value too large for column

    imp/exp ORA-12899: value too large for column
    source :
    os: linux as 4 update4
    .bash_profile NLS_LANG=AMERICAN_AMERICA.US7ASCII
    for run exp bill/admin001 file=bill0518.dmp bill rows=y
    oracle: 10.2.1
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CHARACTERSET US7ASCII
    target :
    os: linux as 4 update4
    .bash_profile NLS_LANG=AMERICAN_AMERICA.AL32UTF8
    for run
    imp bill/admin001 file=bill0518.dmp
    oracle: 10.2.1
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CHARACTERSET AL32UTF8
    imp log
    Import: Release 10.2.0.1.0 - Production on Wed May 16 14:57:59 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc tion
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in US7ASCII character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)
    export client uses AL32UTF8 character set (possible charset conversion)
    . importing BILL's objects into BILL
    . . importing table "MY_SESSION" 44 rows imported
    . . importing table "T1"
    IMP-00019: row rejected due to ORACLE error 12899
    IMP-00003: ORACLE error 12899 encountered
    ORA-12899: value too large for column "BILL"."T1"."NAME" (actual: 62, maximum: 5 0)
    Column 1 1
    Column 2 ÖйúÈË. 0 rows impo rted
    Import terminated successfully with warnings.

    Yes it's probably due to different char sets
    A way around it it to change the DB setup on the new database to use CHAR as default for varchar2 rows, and then use datapump to do your import/export, because datapump uses the default varchar2 type when creating tables that includes varchar2 (which is normally byte). Exp/imp uses the varchar2 type that is in the original database
    Best regards
    /Klaus

  • Oracle : ORA-12899: value too large for column

    Hi Experts,
    I am loading multibyte data from fixed width flat file to Oracle database(which is a utf8 characterset) via Informatica. I have set utf8 as characterset in both source and target definitions.
    Source flat file data : Münchener(this flat file data was loaded from external oracle database where data looks like Münchener)
    When I load the data I am getting below error
    ORA-12899: value too large for column "schema_name"."table"."column" (actual: 513, maximum: 512)
    I know we can declare the data type as varchar2(512 char) instead of varchar2(512 byte). Please let me know the other solution to load multibyte data into target utf8 database.

    You answered your own question and there isn't another solution. You need to increase that column.
    alter table "schema_name"."table" ("column" varchar2(513)); ---Though you should increase it to be the max length that column will ever be. If you don't know pad it. Pad it high. Oracle is very good at handling the space with the varchar2 datatype.

  • ORA-12899: value too large for column

    Hi Experts,
    I am getting data from erp systems in the form of feeds,in particular one column length in feed is 3 only.
    In target table also corresponded column also length is varchar2(3)
    but when i am trying to load same into db ti showing error like:
    ORA-12899: value too large for column
    emp_name (actual: 4, maximum: 3)
    i am using data base version :
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    but this is resolved when the time of increasing target column length to varchar2(5) from varchar2(3)..but i checked length of that column in feed is 3 only...
    my question is why we need to increase the target column length?
    Thanks,
    Surya

    >
    my question is why we need to increase the target column length?
    >
    That can be caused if the two systems are using different character sets. If one is using a single-byte character set like ASCII and the other uses multi-byte like UTF16.
    Three BYTES is three bytes but three CHAR is three bytes in ASCII but six bytes for UTF16.
    Do you know what character sets are being used?
    See the Database Concepts doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm
    >
    Length Semantics for Character Datatypes
    Globalization support allows the use of various character sets for the character datatypes. Globalization support lets you process single-byte and multibyte character data and convert between character sets. Client sessions can use client character sets that are different from the database character set.
    Consider the size of characters when you specify the column length for character datatypes. You must consider this issue when estimating space for tables with columns that contain character data.
    The length semantics of character datatypes can be measured in bytes or characters.
    •Byte semantics treat strings as a sequence of bytes. This is the default for character datatypes.
    •Character semantics treat strings as a sequence of characters. A character is technically a codepoint of the database character set.
    For single byte character sets, columns defined in character semantics are basically the same as those defined in byte semantics. Character semantics are useful for defining varying-width multibyte strings; it reduces the complexity when defining the actual length requirements for data storage. For example, in a Unicode database (UTF8), you must define a VARCHAR2 column that can store up to five Chinese characters together with five English characters. In byte semantics, this would require (5*3 bytes) + (1*5 bytes) = 20 bytes; in character semantics, the column would require 10 characters.
    VARCHAR2(20 BYTE) and SUBSTRB(<string>, 1, 20) use byte semantics. VARCHAR2(10 CHAR) and SUBSTR(<string>, 1, 10) use character semantics.
    The parameter NLS_LENGTH_SEMANTICS decides whether a new column of character datatype uses byte or character semantics. The default length semantic is byte. If all character datatype columns in a database use byte semantics (or all use character semantics) then users do not have to worry about which columns use which semantics. The BYTE and CHAR qualifiers shown earlier should be avoided when possible, because they lead to mixed-semantics databases. Instead, the NLS_LENGTH_SEMANTICS initialization parameter should be set appropriately in the server parameter file (SPFILE) or initialization parameter file, and columns should use the default semantics.

  • ORA-01401: inserted value too large for column

    I am updating a couple dozen columns with this program. Is there a way to include the column name that caused the error in this message?
    Thanks
    H

    10g includes the columnname when throwing an error:
    michaels>  create table t (a varchar2(2))
    Table created.
    michaels>  insert into t values ('xyz')
    insert into t values ('xyz')
    Error at line 6
    ORA-12899: value too large for column "T"."A" (actual: 3, maximum: 2)May we conclude you are not on 10g and up?

Maybe you are looking for

  • How can I make a bootable disk so as to repair my drive?

    Hello, I am away from home and not carrying my Tiger install DVD. I had three crashes after installing Safari Beta 2 days ago and now disk utility reports failure on exit when verifying my Macbook drive. To repair this I need to boot from some other

  • Minimum Number of registered custom id:s/numbers to be registered for purchasing all F-secure products from network

    How many custom-id:s / custom-numbers etc. customer has to register(minimum)in order to purchase All f-secure products on ALL possible platforms?

  • How to handle success/fail chains

    I'm still getting the hang of this LabView programming style and have found a repeating (and annoying) design pattern that I'm sure others have encountered.  I have a long series of steps to perform.  Each step is a prerequisite of the next step and

  • Leaks and ObjectAlloc in Instruments

    I've got a substantially large app which is completely clean with regard to memory leaks (in Instruments), but grows by 2-5 objects / button push (the "AllAlocations" line item in Instruments). It seems the NSMutable Object Instance Variables are res

  • Very unhappy

    Why did my service get suspended for 109 I was going to pay the 109 the 15th of this month I have a check I could put on file