String data right truncation error

Hi, what does this message mean?
Thread id: 14 : Fail to load bulk into DB ERROR in TTCommand.cpp, line 329: Error in TTCmd::Execute() while executing statement
[TimesTen][TimesTen 7.0.5.6.0 ODBC Driver]String data right truncation
*** ODBC Error/Warning = 22001, TimesTen Error/Warning = 0
*** Command execution of statement <insert into TA.TEST values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)> failed.*** Error in TTCmd::ExecuteBatch() : batch of <105> operations failed; only <1> operations succeeded
Thanks in advance,
Andrey

It means what it says. You are trying to insert a string into a CHAR/VARCHAR/NVARCHAR/BINARY/VARBINARY field and the length of the data you are trying to insert is longer than the defined maximum length of a column.
For example, given a table such as:
CREATE TABLE T1
COL1 VARCHAR2(4)
and the prepared statement
INSERT INTO T1 VALUES ( ? );
If I pass 'ABCD' for the parameter then all works fine but if I pass 'ABCDE' for the parameter I get
22001: String data right truncation
You need to ensure that no data you pass in exceeds the expected column width.
Chris

Similar Messages

  • DG4ODBC: STRING DATA, RIGHT TRUNCATION ERROR WHILE ACCESSING VARCHAR(MAX) COLUMN

    Problem Summary
    DG4ODBC: STRING DATA, RIGHT TRUNCATION ERROR WHILE ACCESSING VARCHAR(MAX) COLUMN
    Driver
    Microsoft® ODBC Driver 11 for SQL Server® - RedHat Linux
    Problem Description
    When selecting a MS SQL VARCHAR (max) column over a ODBC Gateway database connection I am getting this error from Oracle:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation {01004}
    ORA-02063: preceding 2 lines from <LINK_NAME>
    The ODBC driver should map the varchar(max) column to SQL_LONGVARCHAR which would be appropriate for Oracle but the column is getting truncated
    Issue
    By default the SQL Server ODBC driver exposes the varchar(max) data type as a SQL_VARCHAR. When reporting the maximum size of a varchar(max) column, the driver returns 0, which is the Microsoft convention for "unlimited".
      [ODBC][25518][1399527750.588980][SQLDescribeCol.c][497]
      Exit:[SQL_SUCCESS]                
      Column Name = [raw_response]                
      Data Type = 0x7fffe3cbe1a4 -> 12                
      Column Size = 0x7fffe3cbe158 -> 0                
      Decimal Digits = 0x7fffe3cbe1ac -> 0                
      Nullable = 0x7fffe3cbe1b0 -> 1
    DG4ODBC is unable to interpret a zero length as an "unlimited" size and returns an error when retrieving varchar(max) data.
    FreeTDS and DataDirect ODBC drivers  return SQL_LONGVARCHAR instead of SQL_VARCHAR with 0 precision. So there is no problem reported for these drivers.
    Is there a fix for this or is the Microsoft ODBC driver team working on a fix for the driver regarding varchar(max)?
    Regards,
    James

    Hi James,
    Thank you for your question. I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    If you have any feedback on our support, please click
    here.
    Regards, 
    Elvis Long
    TechNet Community Support

  • ODBC functions SQLExecDirectW and SQLExecute functions return error:"DIAG [22001] [Microsoft][SQL Server Native Client 10.0]String data, right truncation (0) "

    Problem Description:
    ODBC functions SQLExecDirectW and SQLExecute functions return error:”DIAG [22001] [Microsoft][SQL Server Native Client 10.0]String data, right
    truncation (0) “. When we enable tracing in the ODBC administrator, in the SQL.log we see that values for the arguments: ColumnSize, BufferLength, and StrLen_or_IndPtr of ODBC function SQLBindParameter are not being displayed.
    Environment Used:
    OS: Microsoft Windows Server 2003 R2 Standard x64 Edition.
    Complier: Microsoft Visual Studio 2008 SP1 for x64.
    Database: Microsoft SQL Server 2008
    MDAC: Microsoft Data Access Components SDK 2.8
    Note: This problem is seen only in our 64bit application. However, in 32bit
    SQLExecDirectW and SQLExecute functions return successfully.
    As we could not find the values of 6<sup>th</sup>, 9<sup>th</sup> and 10<sup>th</sup> arguments(ColumnSize,
    BufferLength, and StrLen_or_IndPtr) passed to
    SQLBindParameter in the ODBC traces for 64bit, we are not sure whether the values for the above mentioned arguments are received correctly by SQLBindParameter or not. This information would help us to debug further. So, could you please let us know why
    these values are not displayed.
    1)Here is the extract of the SQL.log file for 32bit where the values for SQLULEN , SQLLEN and SQLLEN* are displayed properly:
    PR0CNFG 1028-15f0 ENTER SQLBindParameter
    HSTMT 0x006FBDD8
    UWORD 1
    SWORD 1 <SQL_PARAM_INPUT>
    SWORD -8 <SQL_C_WCHAR>
    SWORD -9 <SQL_WVARCHAR>
    SQLULEN 23
    SWORD 0
    PTR 0x0595EBBA
    SQLLEN 46
    SQLLEN * 0x05A5FB00
    2)Here is the extract of the SQL.log file for 64bit where the values for SQLULEN , SQLLEN are not displayed properly and
    SQLExecDirectW function return error:”DIAG
    [22001] [Microsoft][SQL Server Native Client 10.0]String data, right truncation (0) “. :
    PR0CNFG a78-fe4 ENTER SQLBindParameter
    HSTMT 000000000431D2F0
    UWORD 1
    SWORD 1 <SQL_PARAM_INPUT>
    SWORD -8 <SQL_C_WCHAR>
    SWORD -9 <SQL_WVARCHAR>
    SQLULEN SQLULEN SWORD 0
    PTR 0x0000000005364EFA
    SQLLEN SQLLEN
    SQLLEN * SQLLEN *
    PR0CNFG a78-fe4 EXIT SQLBindParameter with return code 0 (SQL_SUCCESS)
    HSTMT 000000000431D2F0
    UWORD 1
    SWORD 1 <SQL_PARAM_INPUT>
    SWORD -8 <SQL_C_WCHAR>
    SWORD -9 <SQL_WVARCHAR>
    SQLULEN SQLULEN SWORD 0
    PTR 0x0000000005364EFA
    SQLLEN SQLLEN SQLLEN *

    Hi Nalsr,
    From my research, I found:
    "[Microsoft][ODBC SQL Server Driver]String
    data right truncation" error may be returned from a call to
    SQLBindParameter if the size of the string parameter being used is greater than the size of the column being compared to. In other words if the
    string size of the <expression> to the left of the <comparison_operator> is less than the
    string size of the <expression> to the
    right, ODBC may return this error.
    The resolution is to make the string size of the <expression> to the
    right of the <comparison_operator> less than or equal to the
    string size of the <expression> on the left.
    It is difficult to track down this type of problem when third party development applications are being used. ODBC Trace can be used to help determine if this problem is occuring.
    Here is an example where the customer has submitted a query "select count(*) from type1 where type1 = ?", type1 is varchar(5) and the
    data type being passed by the application is char[9].
    Here is the relevant portion of the trace. The following information from the "exit" of SQLDescribeParam
    SWORD * 0x0095e898 (12)
    UDWORD * 0x0095e880 (5)
    Maps to the following with the actual value in parenthesis - SQL_VARCHAR Size 5:
    SQLSMALLINT *DataTypePtr
    SQLUINTEGER *ParameterSizePtr
    The "exit" value from SQLBindParameter provides the following
    information:
    SWORD 1 <SQL_PARAM_INPUT>
    SWORD 1 <SQL_C_CHAR>
    SQL Data Type SWORD 12 <SQL_VARCHAR>
    Parameter Size UDWORD 5
    SWORD 0
    Value PTR 0x0181c188
    Value Buffer Size SDWORD 5
    String Length SDWORD * 0x0181c103 (9)
    The string length parameter is the length of the
    string being bound to the parameter, in this instance there is a size mismatch which results in the SQLError and the SQLErrorW with the message "[Microsoft][ODBC SQL Server
    Driver]String data
    right truncation" .
    Hope this could be helpful.
    Best regards,
    Halin Huang

  • Getting SQLSTATE:22001(Message : [Microsoft][SQL Server Native Client 11.0]String data, right truncation) in SQL Server 2012 but in SQL server 2008 R2.

    I have an application which connects to SQL through ODBC 11.
    ODBC statement is :
    SELECT PID
    FROM PENTITY PENTITY01 WHERE ((NUM1 NOT BETWEEN ? + 10.7895 AND ? + 200.6734 AND NUM2 NOT IN (5996/ 8, ? - 89.3892, ? + 80.7543))
    and the SQLBindparameter statement is :
    static UCHAR num1[12]=12.589
    rc = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, sqlType, precision, scale,
    &num1, sizeof(num1), NULL);
    With this SQLBindparameter statement I am getting error, It is working without any error if I change the value to 12.
    The same code is working when connecting to SQL server 2008.
    Thanks in advance.

    Hi Nalsr,
    From my research, I found:
    "[Microsoft][ODBC SQL Server Driver]String
    data right truncation" error may be returned from a call to
    SQLBindParameter if the size of the string parameter being used is greater than the size of the column being compared to. In other words if the
    string size of the <expression> to the left of the <comparison_operator> is less than the
    string size of the <expression> to the
    right, ODBC may return this error.
    The resolution is to make the string size of the <expression> to the
    right of the <comparison_operator> less than or equal to the
    string size of the <expression> on the left.
    It is difficult to track down this type of problem when third party development applications are being used. ODBC Trace can be used to help determine if this problem is occuring.
    Here is an example where the customer has submitted a query "select count(*) from type1 where type1 = ?", type1 is varchar(5) and the
    data type being passed by the application is char[9].
    Here is the relevant portion of the trace. The following information from the "exit" of SQLDescribeParam
    SWORD * 0x0095e898 (12)
    UDWORD * 0x0095e880 (5)
    Maps to the following with the actual value in parenthesis - SQL_VARCHAR Size 5:
    SQLSMALLINT *DataTypePtr
    SQLUINTEGER *ParameterSizePtr
    The "exit" value from SQLBindParameter provides the following
    information:
    SWORD 1 <SQL_PARAM_INPUT>
    SWORD 1 <SQL_C_CHAR>
    SQL Data Type SWORD 12 <SQL_VARCHAR>
    Parameter Size UDWORD 5
    SWORD 0
    Value PTR 0x0181c188
    Value Buffer Size SDWORD 5
    String Length SDWORD * 0x0181c103 (9)
    The string length parameter is the length of the
    string being bound to the parameter, in this instance there is a size mismatch which results in the SQLError and the SQLErrorW with the message "[Microsoft][ODBC SQL Server
    Driver]String data
    right truncation" .
    Hope this could be helpful.
    Best regards,
    Halin Huang

  • Msg 0, Sev 0, State 1: Unknown token received from SQL Server [SQLSTATE HY000] String data, right truncation [SQLSTATE 01004] [SQLSTATE 08S01] error

    I'm looking for some general guidance on this complete error:
    Msg 0, Sev 0, State 1: Unknown token received from SQL Server [SQLSTATE HY000]
    String data, right truncation [SQLSTATE 01004]
    Msg 16389, Sev 16, State 1: The connection is no longer usable because the server response for a previously executed statement was incorrectly formatted. [SQLSTATE 08S01]
    This error is caused by a SQL Agent Job, but it does not always occur. I understand this could be an issue with SQL dropping the connection, but what is the best way to troubleshoot this?
    Thanks,
    Phil

    Hi philliptackett77,
    It would be more helpful for troubleshooting the issue if you post the SQL Server error log and SQL Server version. Additionally, please state what purpose of using the agent job.
    Based on my research, [SQLSTATE 08S01] error means communication link failure. If the executed statement returns invalid value in the job, the connection between server and client will fail. This error could be caused by the error of [SQLSTATE HY000] and
    [SQLSTATE 01004]. I’d like to share my knowledge about these errors as below.
    Quote: String data, right truncation [SQLSTATE 01004]
    This error could occur when passing data whose length is larger than the received object,and the passed value is truncated, and returns invalid value. So please check if the data type of the objects are identical and the length of passed value is not larger
    than the received object.
    Quote: Msg 0, Sev 0, State 1: Unknown token received from SQL Server [SQLSTATE HY000]
    The error could occur in the two cases below.
    1. If you use SQL Server version 6.50, and execute the cursor in the job step, set the statement options to use a server-side cursor and prepare a select statement on a SQL Server system table. The first execution of the select creates the cursor successfully.
    After you close this cursor, if you execute the prepared statement again, the error could occur.
    I recommend you to apply the latest service pack firstly. If the error still occurs, you could change your code by using a forward-only cursor instead of a static, keyset, or dynamic cursor on the system tables. If a forward-only cursor is unacceptable,
    prepare the select statement again on the system table and execute it to create a server-side cursor. For more information about the process, please refer to the article:
    http://support.microsoft.com/kb/151693/en-us
    2. The TDS stream from the server is invalid when transfer data between a database server and a client. This error is typically caused by a problem on the server. For more information about errors above, please refer to the article:
    http://technet.microsoft.com/en-us/library/aa937531(v=sql.80).aspx
    Regards,
    Michelle Li

  • WARNING OGG-00869  Oracle GoldenGate Delivery, repdb2.prm:  [SQL error 0 (0x0)][Oracle][ODBC PostgreSQL Wire Protocol driver]String data, right truncated.

         When I migrate CLOB datas from Oracle 10g to PostgreSQL 9.0,and the target data type is text,the replicat process abend,and it reports as following:
    WARNING OGG-03056  Oracle GoldenGate Delivery, repdb2.prm:  Source table SDCMNET.T_INFO_SUPERIOR_PROGRAM column PRO_CONTENT_CLOB data size exceeds the maximum target table sdcmnet.t_info_superior_program column pro_content_clob size. Automatic truncation is enabled for all tables/columns without further warnings.
    WARNING OGG-00869  Oracle GoldenGate Delivery, repdb2.prm:  [SQL error 0 (0x0)][Oracle][ODBC PostgreSQL Wire Protocol driver]String data, right truncated.
    WARNING OGG-01004  Oracle GoldenGate Delivery, repdb2.prm:  Aborted grouped transaction on 'sdcmnet.t_info_superior_program', Database error 0 ([SQL error 0 (0x0)][Oracle][ODBC PostgreSQL Wire Protocol driver]String data, right truncated.
         But,according to the SEQNO and RBA,I find the records have been migrated,and the length of records is equal to what is in oracle.Then I try to use the odbc driver of postgresql 9.3 to replace,although I can login the database ,but it warns again.
         Can anyone help me?

    This forum is for Oracle Maven Repository.  You might have more luck posting your question in an forum for GoldenGate - you are more likely to find someone who knows about that product in its own forums.

  • [Oracle][ODBC SQL Server Driver]String data, right truncation {01004}

    While importing data from SQL Server 2005 to Oracle gateway 11g Release2, i am getting following error:
    insert into CSDescr select * from CSDescr@sqlserver
    ERROR at line 1:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    +[Oracle][ODBC SQL Server Driver]String data, right truncation {01004}+
    ORA-02063: preceding 2 lines from SQLSERVER
    Oracle database characterset is AL32UTF8
    SQLServer database characterset is SQL_Latin1_General_CP1_CI_AS
    Following is the configuration in the parameter file for gateway:
    HS_KEEP_REMOTE_COLUMN_SIZE=LOCAL
    HS_NLS_LENGTH_SEMANTICS=CHAR
    I think setting the HS_LANGUAGE parameter shall fix the error but I  want to know what should be the value of this parameter?

    HS_LANGUAGE needs to be set to a character set that is used by the foreign database
    So try: HS_LANGUAGE=american_america.WE8MSWIN1252
    Also specify HS_NLS_NCHAR=UCS2 as the nvarchars of a SQl Server are stored in UCS2 character set

  • String data right truncation

    I have a PreparedStatement to insert into a 104 column table. When I run the procedure it throwing an exception
    [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001
    COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001
    How can I find out which column is doing this?
    Is there any method or a call I can use to pin point the error?
    thanks,

    And exactly how many fields do you have that can cause the problem?
    The problem is because you are passing more text than can fit into a field. So how many fields do you have like that?

  • [JDBC Progress Driver]:String data, right truncated.

    Hi everybody,
    I have a strange error that i just cannot figure out.
    I have a entitybean with an EJBStore method. In that method I create a PreparedStatement like this
    String update = "update myTable set commentField = ? where objectnumber = ?";
    PreparedStatement pstmt = con.prepareStatement(update);
    pstmt.setString(1, commentString);
    pstmt.setString(2, objectnumber); The database field "commentField" has a max of 250 characters as defined in the database. The string "commentString" is a normal string.
    The problem is, if any character higher than ALT-127 is stored, it seems that 2 bytes are used when validating field length. This means that I can store 250 of "A"'s (ALT-065) but just 125 "�"'s (ALT-128).
    When I try to update the field with 126+ "�"'s i get the folowing message:
    javax.ejb.EJBException: [JDBC Progress Driver]:String data, right truncated.  Error in parameter 1.This errormessage is exactly the same when I try to update the same field with 251+ "A"'s
    The strangest is: manually, with a SQL-tool provided by Progress I can easily add 250 "�"'s in the database. So I think it might be the JDBC driver.
    This maybe has something to do with encodings, but when I use "String.getbytes()" with different encodings en count the number of bytes, these are always correct (byte[].length <= 250) and the same errormessage appears.
    Could someone shed some ligth on my problem? I'm completely lost.
    Thank you for your time and attention,
    Leon Noordermeer
    [email protected]
    Some extra info:
    JDK1.2.1
    Progress 91A
    JDBC driver suplied with Progress 91A
    Apptivity 3.2

    Hello!
    Did anyone get jdbc connection with Progress dabase successfully?
    Did any one know this error message when I connect from client to server?
    java.sql.SQLException: [JDBC Progress Driver]:Exceeding permissible number of connections.
    I would greatly appreciate if anyone can let me know.

  • ORA-28500 + "String data, right truncation" when selecting nvarchar(max)

    Hi,
    I was able to set up a db link from Oracle 11.2.0.1 to SQL Server 2005 using DG4ODBC.
    When trying to select a column with nvarchar(max) datatype from the db link I get the following error:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}
    ORA-02063: preceding 2 lines from SQLSERVER_DBLINKThe actual data in the column doesn't exceed 31 chars but the query still fails.
    Any suggestions?
    Thanks.

    The character set is AL32UTF8
    Here is the relevant data from the trace file:
    Entered hgopars, cursor id 1 at 2010/12/23-12:08:59
    type:0
    SQL text from hgopars, id=1, len=47 ...
         00: 53454C45 43542041 312E2243 6F6D6D65  [SELECT A1."Comme]
         10: 6E742220 46524F4D 20224442 4F222E22  [nt" FROM "DBO"."]
         20: 565F4442 56455253 494F4E22 204131    [V_DBVERSION" A1]
    Exiting hgopars, rc=0 at 2010/12/23-12:08:59
    hostmstr: 2011148288:      HOA After hoxpars
    hostmstr: 2011148288:      HOA Before hoxopen
    Entered hgoopen, cursor id 1 at 2010/12/23-12:08:59
    hgoopen, line 87: NO hoada to print
    Deferred open until first fetch.
    Exiting hgoopen, rc=0 at 2010/12/23-12:08:59
    hostmstr: 2011148288:      HOA After hoxopen
    hostmstr: 2011148288:      HOA Before hoxdscr
    Entered hgodscr, cursor id 1 at 2010/12/23-12:08:59
    Allocate hoada @ 038B493C
    Entered hgopcda at 2010/12/23-12:08:59
    Column:1(Comment): dtype:-9 (WVARCHAR), prc/scl:0/0, nullbl:1, octet:0, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2010/12/23-12:08:59
    hgodscr, line 910: Printing hoada @ 038B493C
    MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)
    hoadaMOD bit-values found (0x40:TREAT_AS_NCHAR)
    DTY         NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
    12 VARCHAR Y          0          0 128/  0 1000   0  40 Comment
    Exiting hgodscr, rc=0 at 2010/12/23-12:08:59
    hostmstr: 2011148288:      HOA After hoxdscr
    hostmstr: 2011148288: RPC After SQL Bundling
    hostmstr: 2011148288: RPC Before SQL Bundling
    hostmstr: 2011148288:      HOA Before hoxclse
    Entered hgoclse, cursor id 1 at 2010/12/23-12:08:59
    Exiting hgoclse, rc=0 at 2010/12/23-12:08:59
    hostmstr: 2011148288:      HOA After hoxclse
    hostmstr: 2011148288:      HOA Before hoadafr
    Entered hgodafr, cursor id 1 at 2010/12/23-12:08:59
    Free hoada @ 038B493C
    Exiting hgodafr, rc=0 at 2010/12/23-12:08:59
    hostmstr: 2011148288:      HOA After hoadafr
    hostmstr: 2011148288:      HOA Before hoxpars
    Entered hgopars, cursor id 1 at 2010/12/23-12:08:59
    type:0
    SQL text from hgopars, id=1, len=47 ...
         00: 53454C45 43542041 312E2243 6F6D6D65  [SELECT A1."Comme]
         10: 6E742220 46524F4D 20224442 4F222E22  [nt" FROM "DBO"."]
         20: 565F4442 56455253 494F4E22 204131    [V_DBVERSION" A1]
    Exiting hgopars, rc=0 at 2010/12/23-12:08:59
    hostmstr: 2011148288:      HOA After hoxpars
    hostmstr: 2011148288:      HOA Before hoxopen
    Entered hgoopen, cursor id 1 at 2010/12/23-12:08:59
    hgoopen, line 87: NO hoada to print
    Deferred open until first fetch.
    Exiting hgoopen, rc=0 at 2010/12/23-12:08:59
    hostmstr: 2011148288:      HOA After hoxopen
    hostmstr: 2011148288:      HOA Before hoxdscr
    Entered hgodscr, cursor id 1 at 2010/12/23-12:08:59
    Allocate hoada @ 038B6C98
    Entered hgopcda at 2010/12/23-12:08:59
    Column:1(Comment): dtype:-9 (WVARCHAR), prc/scl:0/0, nullbl:1, octet:0, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2010/12/23-12:08:59
    hgodscr, line 910: Printing hoada @ 038B6C98
    MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)
    hoadaMOD bit-values found (0x40:TREAT_AS_NCHAR)
    DTY         NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
    12 VARCHAR Y          0          0 128/  0 1000   0  40 Comment
    Exiting hgodscr, rc=0 at 2010/12/23-12:08:59
    hostmstr: 2011148288:      HOA After hoxdscr
    hostmstr: 2011148288: RPC After SQL Bundling
    hostmstr: 2011148288: RPC Before Fetch Row
    hostmstr: 2011148288:      HOA Before hoaftch
    Entered hgoftch, cursor id 1 at 2010/12/23-12:08:59
    hgoftch, line 130: Printing hoada @ 038B6C98
    MAX:1, ACTUAL:1, BRC:100, WHT=5 (SELECT_LIST)
    hoadaMOD bit-values found (0x40:TREAT_AS_NCHAR)
    DTY         NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
    12 VARCHAR Y          0          0 128/  0 1000   0  40 Comment
    Performing delayed open.
    SQLBindCol: column 1, cdatatype: -8, bflsz: 2
    Entered hgopoer at 2010/12/23-12:08:59
    hgopoer, line 233: got native error 0 and sqlstate 01004; message follows...
    [Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}
    Exiting hgopoer, rc=0 at 2010/12/23-12:08:59
    hgoftch, line 740: calling SQLFetch got sqlstate 01004
    Entered hgopoer at 2010/12/23-12:08:59
    hgopoer, line 233: got native error 0 and sqlstate 01004; message follows...
    [Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}[Microsoft][SQL Native Client]String data, right truncation {01004}
    Exiting hgopoer, rc=0 at 2010/12/23-12:08:59
    hgoftch, line 971: calling SQLGetData got sqlstate 01004
    100 rows fetched
    Exiting hgoftch, rc=28500 at 2010/12/23-12:08:59 with error ptr FILE:hgoftch.c LINE:971 ID:Row error while doing array fetch
    hostmstr: 2011148288:      HOA After hoaftch
    hostmstr: 2011148288: RPC After Fetch RowThanks

  • Datetime field overflow / String data right truncation

    Hi All,
    Getting the follwing erros while working with timestamp for selecting from or inserting data into DB2 through WebSphere 6.1.
    I am passing values like this: 2006-05-02-21.57.26.744341.
    The queries run fine while executing through some SQL Frontend editor.
    [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008
    [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001
    Please let me know the problem.

    If you are trying to convert to a java.sql.Timestamp as part off the process of inserting into DB2 then Timestamp is derived from java.util.Date which holds the time in milli-seconds but you are providing a microseconds field.
    Could this be the problem?

  • Encountered ODBC error 1: 01004, 0, [Oracle][ODBC]String data, right trun

    I am getting the following error like "07/01 17:33:33 (3380 0EC4): Encountered ODBC error 1: 01004, 0, [Oracle][ODBC]String data, right truncated."
    What does this error means.The set of query I am running for insertion is same for 32bit(Windows 2003 Server) and 64bit (Windows 2008 Server R2).
    In case of the former this works perfectly without any error but in case of 64bit I am getting the above issue.Any suggestion would be of great help and what is the workaround for this.
    Thanks in advance.
    -R

    Sorry for incomplete information. Basically there is a insertion and then there is retrieval of information from the same data table.
    When I am inserting data of blob type I am getting data and grabage value also.
    From the backend when I am using plsql and querying on that paritcular table from the 2nd row onwards I am getting garbage value apended with the string.How I see the garbage is when I click on the blob data under the plsql respective table it takes me to string by default for all the columns containing blob and from 2nd column onwards I get the garbage appended with the string.
    This garbage value is not present in the 1st row at all but it from the 2nd row it comes.
    desc of the particular table I am talking about is
    SQL> desc Table_1084;
    Name Null? Type
    BBID NOT NULL NUMBER
    KEYORDER NOT NULL NUMBER
    KEYLENGTH NOT NULL NUMBER
    DTTM_DOM NOT NULL NUMBER(2)
    KEYVALUE BLOB
    2ndly I tried to remove the garbage using memset.This time there is no garbage but from the 2nd row onwards when I click on the blob from the plsql backend
    I did memset for deleting the garbage.But then after 2nd column onwards when I click on the blob it takes me hex by default not to text.When I come to text I don't see any garbage.
    In both the cases I get the above error when I try to retrieve the above information from the DB.
    The same set of query runs well when I use Windows 32bit but I am getting issue when I am using Windows 2008 Server 64bit.
    Below I have given the code snipet any thoughts or inputs would be very much appreciated.
    SQLLEN lsqlkeyElementIDLengths = *(this->keyElementIDLengths);
    SQLBindParameter(this->statement,1, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementBlackBoxIDs, 0, &lsqlkeyElementIDLengths);
    SQLLEN lsqlkeyElementOrderLengths = *(this->keyElementOrderLengths);
    SQLBindParameter(this->statement,2, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementOrders, 0, &lsqlkeyElementOrderLengths);
    SQLLEN lsqlkeyElementLengthLengths = *(this->keyElementLengthLengths);
    SQLBindParameter(this->statement,3, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementLengths, 0, &lsqlkeyElementLengthLengths);
    SQLLEN lsqlkeyElementValueLengths = *(this->keyElementValueLengths);
    SQLBindParameter(this->statement,4, SQL_PARAM_INPUT, SQL_C_BINARY, SQL_LONGVARBINARY,
    elementSize, 0, this->keyElementValues,
    elementSize, &lsqlkeyElementValueLengths);
    SQLExecDirect(this->statement, (unsigned char*) insertcommand, SQL_NTS);
    Here the this->keyElementValues is of void pointer.
    When I query on the back ground I get the below garbage value
    ntdll.dll!KiFastSystemCallRet 0x7c8285ec
    kernel32.dll + 0x24ed (0x77e424ed)
    termite.exe!CTermiteDlg::TestRegisterMemoryProc 0x004050ed c:\cm\build\public\tkbkwincln.10-01-06\talkback\src\client\termite\win32\termdlg.cpp, line 460Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾
    Let me know if I can provide more information.
    Thanks,
    -R

  • Encountered ODBC error 1: 01004, 0, [Oracle][ODBC]String data, right trunca

    Dear All,
    I am getting the following error like "07/01 17:33:33 (3380 0EC4): Encountered ODBC error 1: 01004, 0, [Oracle][ODBC]String data, right truncated."
    What does this error means.The set of query I am running for insertion is same for 32bit(Windows 2003 Server) and 64bit (Windows 2008 Server R2).
    In case of the former this works perfectly without any error but in case of 64bit I am getting the above issue.Any suggestion would be of great help and what is the workaround for this.
    When I am inserting data of blob type I am getting data and grabage value also.
    From the backend when I am using plsql and querying on that paritcular table from the 2nd row onwards I am getting garbage value apended with the string.How I see the garbage is when I click on the blob data under the plsql respective table it takes me to string by default for all the columns containing blob and from 2nd column onwards I get the garbage appended with the string.
    This garbage value is not present in the 1st row at all but it from the 2nd row it comes.
    desc of the particular table I am talking about is
    SQL> desc Table_1084;
    Name Null? Type
    BBID NOT NULL NUMBER
    KEYORDER NOT NULL NUMBER
    KEYLENGTH NOT NULL NUMBER
    DTTM_DOM NOT NULL NUMBER(2)
    KEYVALUE BLOB
    2ndly I tried to remove the garbage using memset.This time there is no garbage but from the 2nd row onwards when I click on the blob from the plsql backend
    I did memset for deleting the garbage.But then after 2nd column onwards when I click on the blob it takes me hex by default not to text.When I come to text I don't see any garbage.
    In both the cases I get the above error when I try to retrieve the above information from the DB.
    The same set of query runs well when I use Windows 32bit but I am getting issue when I am using Windows 2008 Server 64bit.
    Below I have given the code snipet any thoughts or inputs would be very much appreciated.
    SQLLEN lsqlkeyElementIDLengths = *(this->keyElementIDLengths);
    SQLBindParameter(this->statement,1, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementBlackBoxIDs, 0, &lsqlkeyElementIDLengths);
    SQLLEN lsqlkeyElementOrderLengths = *(this->keyElementOrderLengths);
    SQLBindParameter(this->statement,2, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementOrders, 0, &lsqlkeyElementOrderLengths);
    SQLLEN lsqlkeyElementLengthLengths = *(this->keyElementLengthLengths);
    SQLBindParameter(this->statement,3, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementLengths, 0, &lsqlkeyElementLengthLengths);
    SQLLEN lsqlkeyElementValueLengths = *(this->keyElementValueLengths);
    SQLBindParameter(this->statement,4, SQL_PARAM_INPUT, SQL_C_BINARY, SQL_LONGVARBINARY,
    elementSize, 0, this->keyElementValues,
    elementSize, &lsqlkeyElementValueLengths);
    SQLExecDirect(this->statement, (unsigned char*) insertcommand, SQL_NTS);
    Here the this->keyElementValues is of void pointer.
    When I query on the back ground I get the below garbage value
    ntdll.dll!KiFastSystemCallRet 0x7c8285ec
    kernel32.dll + 0x24ed (0x77e424ed)
    termite.exe!CTermiteDlg::TestRegisterMemoryProc 0x004050ed c:\cm\build\public\tkbkwincln.10-01-06\talkback\src\client\termite\win32\termdlg.cpp, line 460Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾
    Let me know if I can provide more information.
    Thanks,
    -R

    Dear All,
    I am getting the following error like "07/01 17:33:33 (3380 0EC4): Encountered ODBC error 1: 01004, 0, [Oracle][ODBC]String data, right truncated."
    What does this error means.The set of query I am running for insertion is same for 32bit(Windows 2003 Server) and 64bit (Windows 2008 Server R2).
    In case of the former this works perfectly without any error but in case of 64bit I am getting the above issue.Any suggestion would be of great help and what is the workaround for this.
    When I am inserting data of blob type I am getting data and grabage value also.
    From the backend when I am using plsql and querying on that paritcular table from the 2nd row onwards I am getting garbage value apended with the string.How I see the garbage is when I click on the blob data under the plsql respective table it takes me to string by default for all the columns containing blob and from 2nd column onwards I get the garbage appended with the string.
    This garbage value is not present in the 1st row at all but it from the 2nd row it comes.
    desc of the particular table I am talking about is
    SQL> desc Table_1084;
    Name Null? Type
    BBID NOT NULL NUMBER
    KEYORDER NOT NULL NUMBER
    KEYLENGTH NOT NULL NUMBER
    DTTM_DOM NOT NULL NUMBER(2)
    KEYVALUE BLOB
    2ndly I tried to remove the garbage using memset.This time there is no garbage but from the 2nd row onwards when I click on the blob from the plsql backend
    I did memset for deleting the garbage.But then after 2nd column onwards when I click on the blob it takes me hex by default not to text.When I come to text I don't see any garbage.
    In both the cases I get the above error when I try to retrieve the above information from the DB.
    The same set of query runs well when I use Windows 32bit but I am getting issue when I am using Windows 2008 Server 64bit.
    Below I have given the code snipet any thoughts or inputs would be very much appreciated.
    SQLLEN lsqlkeyElementIDLengths = *(this->keyElementIDLengths);
    SQLBindParameter(this->statement,1, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementBlackBoxIDs, 0, &lsqlkeyElementIDLengths);
    SQLLEN lsqlkeyElementOrderLengths = *(this->keyElementOrderLengths);
    SQLBindParameter(this->statement,2, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementOrders, 0, &lsqlkeyElementOrderLengths);
    SQLLEN lsqlkeyElementLengthLengths = *(this->keyElementLengthLengths);
    SQLBindParameter(this->statement,3, SQL_PARAM_INPUT, SQL_C_ULONG, SQL_INTEGER,
    0, 0, this->keyElementLengths, 0, &lsqlkeyElementLengthLengths);
    SQLLEN lsqlkeyElementValueLengths = *(this->keyElementValueLengths);
    SQLBindParameter(this->statement,4, SQL_PARAM_INPUT, SQL_C_BINARY, SQL_LONGVARBINARY,
    elementSize, 0, this->keyElementValues,
    elementSize, &lsqlkeyElementValueLengths);
    SQLExecDirect(this->statement, (unsigned char*) insertcommand, SQL_NTS);
    Here the this->keyElementValues is of void pointer.
    When I query on the back ground I get the below garbage value
    ntdll.dll!KiFastSystemCallRet 0x7c8285ec
    kernel32.dll + 0x24ed (0x77e424ed)
    termite.exe!CTermiteDlg::TestRegisterMemoryProc 0x004050ed c:\cm\build\public\tkbkwincln.10-01-06\talkback\src\client\termite\win32\termdlg.cpp, line 460Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾Þï¾
    Let me know if I can provide more information.
    Thanks,
    -R

  • Right Truncation, varchar in SQL Server, double-byte in Oracle

    Hi.
    We have a DB Link using DG4MSQL from Oracle 11.1.0.7.0 to a SQL Server 2005 database. The Oracle database is set up to use UTF-8 so all character fields are double-byte on the oracle side.
    On the SQL Server table we have a column defined as varchar(32). When doing a select * from this table (from Oracle, over the DB link), everything works fine if that column contains values with a length of 16 characters or less. When the column contains 17 - 32 characters we get the following error:
    Error report:
    SQL Error: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Oracle][ODBC SQL Server Driver]String data, right truncation {01004}
    ORA-02063: preceding 2 lines from SQLUAT
    28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
    *Cause:    The cause is explained in the forwarded message.
    *Action:   See the non-Oracle system's documentation of the forwarded
    message.
    It looks like Oracle (or the ODBC driver) is bringing the data back as double-byte even though it is declared as varchar. If we change the column on the SQL server side to nvarchar, everything works fine.
    Is this a bug? Or is there a setting that can be specified for the gateway so that it recognizes SQL Server varchar columns as single-byte, to prevent them from coming over as double-byte and messing up the ODBC driver? Or is there anything else we should do to prevent this problem?
    Thanks

    Hi,
    I don't think it's a problem with the hs or the dblink (but I may be wrong):
    UTF-8 is double-bytes as you said. when you declare varchar2(32) it actually means you can insert up to 32 bytes --> 16 characters.
    even if you do a simple insert to the table with more than 16 characters - it will fail.
    In order to overcome this you should declare the table with varchar2(32 char) which will tell Oracle to allocate enough bytes to hold 32 chars - not bytes. In UTF-8 this means 64 bytes (2*n). If you'd be using AL32UTF-8 this would mean 4*n.
    BTW- why are you using UTF-8 and not AL32UTF8?
    Hope this helps.

  • Error: 0xC020902A at Data Flow Task, XML Source [24515]: The "component "XML Source" (24515)" failed because truncation occurred, and the truncation row disposition on "output column "MsgLev1" (26196)" specifies failure on truncation. A truncation error o

    When I was Importing data from XML to SqlServer using SSIS , I am getting this error. The import is working if i use small file and not working if I use large XMl file. Can any one of you guys help me out with the issue?
    Error: 0xC020902A at Data Flow Task, XML Source [24515]: The "component "XML Source" (24515)" failed because truncation occurred, and the truncation row disposition on "output column "MsgLev1" (26196)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
    Error: 0xC02092AF at Data Flow Task, XML Source [24515]: The component "XML Source" (24515) was unable to process the XML data. Pipeline component has returned HRESULT error code 0xC020902A from a method call.
    Error: 0xC0047038 at Data Flow Task: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "XML Source" (24515) returned error code 0xC02092AF.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "SourceThread0" has exited with error code 0xC0047038.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread1" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread3" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread4" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047039 at Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread2" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread0" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread1" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread2" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread3" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
    Error: 0xC0047021 at Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread4" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.

    The reason is in the first line of the error.  It doesn't have anything to do with the size of your XML file - it has to do with the contents of the "MsgLev1" column.  You (or the XSD) has indicated that the values in this column not exceed a certain size - but one of the values in the file that's failing is larger than that.
    In order to fix the problem, you're going to need to increase the allocated space for that column.  In order to do that, you're going to need to find out what the required size of that data is - either from someone who ought to know, or by direct examination of the file.  If you want to know which entity has this overly large data element in it, you need to configure the error handling of the XML Source to "redirect truncation errors".  Then you can hook up the XML Source's error output to another destination where you can see which rows are problematic.
    Talk to me on

Maybe you are looking for

  • Ipad 2 springboard cashing constantly, help!

    What causes these springboard crashes on an iPad 2, non jail broken, with updated iOS? No apps at all... Just the plain Jane ios5.1.1 So... I'm at my ropes end... Ready to bounce this thing off the wall at high velocity... This is my second iPad in 7

  • DMU 1.1 Sub-menu options not displaying from Linux /VNC4

    Environment DMU 1.1 Linux 2.6.18-92.1.22.el5 CentOS 5.2 (Final) x86_64 JAVA 1.6.0_25 RDBMS 10.2.0.5.0 The sub-menus options don't display when executing DMU from the Linux OS via VNC4. I can create a connection but it won't save. Neither will the opt

  • Itunes 11 releease date for windows 8?

    Hi does anyone know when the release date is after being delayed from october to november.... appreciate reply!

  • Solaris7 on Compaq SP700

    How do I go about installing Solaris7 on a Compaq SP700? Everything goes fine (installing from IDE CD-ROM) until X windows comes up. I've tried removing the PCI IDE driver and using the ISA IDE driver. So I end up with either no CD mounted or no X wi

  • Help - HDV tape import problem - Sony HC-3 broken - Questions/Warning

    My Sony HC-3 HD camcorder has just failed. I've had it just over 3 years. I really don't enjoy video editing much, and despite maybe shooting 20-30 tapes of HD footage of my young children, I'd only got round to importing a handful over Firewire, but