Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2005
    Posts
    102

    Unanswered: Altering a BLOB column length

    Hi All,

    Env: DB2 UDB v8.2, FP 7a, OS: Windows 2003 Standard Edition

    Can I alter a BLOB column length? My current BLOB column length is set to 15MB, can I increase it to 20MB using Alter table statement? I couldn't find the information anywhere specific to LOBs.

    Thanks

    Anks

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I looked at the syntax diagram for ALTER TABLE .. ALTER COLUMN and it does not mention LOBS, so the answer is that you cannot change the length.


    Andy

  3. #3
    Join Date
    Jul 2005
    Posts
    102
    So does that mean, the only way to change it is to recreate the table and export and import the data?

    Thanks
    Anks

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Yes, but you can do it this way:

    1) export data.
    2) rename table
    3) create new table
    4) create all RI to new table
    5) insert from old table or import
    6) verify data
    7) drop old table with new name

    Andy

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Use version 9 if possible. It allows many more column alterations, including changing the maximum allowed length for BLOB columns.

    http://publib.boulder.ibm.com/infoce...c/r0000888.htm
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  6. #6
    Join Date
    Jul 2005
    Posts
    102
    Thanks for everybody's input.

    Anks

Posting Permissions

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