Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655

    Unanswered: Does My Table Contain LOBs ?

    Hi Guys,

    I need to test the table being exported if it has LOBs.

    eg.

    db2 export to DBFinder.STAFF.del of del select * from DBFinder.STAFF

    db2 export to DBFinder.IN_TRAY.del of del select * from DBFinder.IN_TRAY

    The second statement fails because it contains LOBs.

    So I need to know beforehand any table being exported does not contail LOBs.
    and -- suggest me the statemennt to export LOBs table.

    DB2 version 9.5


    Thanks
    DBFinder
    Last edited by DBFinder; 09-18-08 at 06:06.

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Have a look at the manual. It describes the LOBSINFILE option, which you have to use to tell the export command how to handle lobs.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    That's for later on.

    The concern is to find out if table contains any LOBs.

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    You could simply specify the LOB options - or you query SYSCAT.COLUMNS to figure out whether LOBs exist or not.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  5. #5
    Join Date
    Dec 2007
    Posts
    15
    Export Lobs on every table, even on tables w/o lobs. Tables with no LOBS will not generate a LOBS file.

    Code:
    EXPORT TO DBFinder.STAFF.DEL OF DEL LOBS TO LOBS/ LOBFILE STAFF modified by lobsinfile select * from DBFinder.STAFF
    
    EXPORT TO DBFinder.IN_TRAY.DEL OF DEL LOBS TO LOBS/ LOBFILE IN_TRAY modified by lobsinfile select * from DBFinder.IN_TRAY

  6. #6
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Thanks Guys,
    I used syscat.columns to know about lobs.
    BTW I used HarbingL's advice to write statements.

    Thanks
    DBFinder

Posting Permissions

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