Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Posts
    6

    Unanswered: Large XML Result

    Hi,

    I am using the DB2 Command Editor to run an XQuery that returns a large XML result.

    the problem is that the result is truncated, so I see only a part of the XML document.

    I understand that it might be the buffer size is not large enough to keep the whole result.

    How can I solve this problem?

    I am using DB2 express running on Ubuntu 7.04

    Thank you very much in advance.
    Essam

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    I'm not sure if this also applies to the Command Editor, but the DB2 CLP truncates LOBs and XML documents to 4 or 8K. This cannot be changed.

    The background is that the CLP doesn't want to write out up to 2GB of data when a table containing such data is queried. If you need the full data, you usually have an application anyways and don't look at it on the CLP in detail.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    May 2003
    Posts
    113
    Quote Originally Posted by stolze
    I'm not sure if this also applies to the Command Editor, but the DB2 CLP truncates LOBs and XML documents to 4 or 8K. This cannot be changed.

    The background is that the CLP doesn't want to write out up to 2GB of data when a table containing such data is queried. If you need the full data, you usually have an application anyways and don't look at it on the CLP in detail.
    Agree. A good alternative is to use an application(like java) to grab the result.

    I am not sure whether this works: if DB2/LUW have xmlserialize or xml2clob function, you can use this function to get lob result first.

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Converting XML to CLOBs is possible, of course, but you will have the limitations applicable for LOBs that I mentioned.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  5. #5
    Join Date
    Jul 2007
    Posts
    6
    thank you very much.

    I will try to make it using a java application.

    I was using Oracle 10g, in which I can run a command to enlarge the size to let the complete result appear. I thought there is something like that in DB2.

    Essam

Posting Permissions

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