Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2012

    Unanswered: problem insert long XML into DB2 table

    I have a simple table containing a XML field. Normally I will just use
    INSERT INTO TABLE VALUES (1, '<xml>my xml</xml>', 'N', 'Y')
    and it always works.

    But this time I have a very long XML(69632 Bytes) to insert, db2 give me a SQL0102N error.

    Then I tried to save my command in a sql file and run it by
    db2 -td@ -s -f"pathToMySQLFile\mycommand.sql"
    . But I got exactly the same error.

    I tried also to use import option of table in control center, then I got SQL3115W The field value beginning "'<?xml version="1.0" ?>" in row
    "1" and column "2" is longer than the longest allowable table column. The
    value was truncated.

    Now I am stuck. How can I insert this long XML into my table? Any help please? I am using DB2 Enterprise 9.7.
    Last edited by Kilimanjaro; 06-18-12 at 05:52.

  2. #2
    Join Date
    Apr 2006
    Provided Answers: 11
    according the doc

    Since the import utility restricts the size of a single column value to 32 KB, extra considerations need to be taken when importing LOBs.
    put the lob in a file and use modified by lobsinfile with import command
    LOB import considerations
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

  3. #3
    Join Date
    Jan 2012
    thanks a lot! I have not thought of that. Will try it now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts