Topic
4 replies Latest Post - ‏2014-03-25T16:44:23Z by Paul.Dunbar
Paul.Dunbar
Paul.Dunbar
8 Posts
ACCEPTED ANSWER

Pinned topic Retreiving BLOB content from column

‏2014-03-05T18:44:39Z |

I'm working with a table in a DB2 9.7 database which has a BLOB column.  When browsing the table data using Data Studio 4.1.0.0, I see that the blob value is there and is somehow encoded, but I'm not sure what I can use to decode that content.  I've attempted to base64-decode the content but didn't come up with anything that seemed usable.

Ideally, what I'd like is to be able to download that directly to a file on the client's filesystem.  Are there tools provided within data studio (or otherwise) that would allow me to do this?

Updated on 2014-03-05T18:48:45Z at 2014-03-05T18:48:45Z by Paul.Dunbar
  • YuanFeng
    YuanFeng
    78 Posts
    ACCEPTED ANSWER

    Re: Retreiving BLOB content from column

    ‏2014-03-18T06:52:28Z  in response to Paul.Dunbar

    Hi,Paul

    Binary objects like photos or media need a program to display it.

    What you can do is use the export command,specify LOBSINSEPFILES, so the lob is save to each file and you can download it and choose a program to display it.

    Here's an exampe. you can also use our Unload->With Export Utility to launch a GUI at the table right click menu. The export utility is only on the server side.

    example:

    CALL SYSPROC.ADMIN_CMD( 'EXPORT TO "E:\tmp\picture" OF DEL LOBS TO "E:\tmp" MODIFIED BY LOBSINSEPFILES MESSAGES ON SERVER SELECT * FROM DB2ADMIN.EMP_PHOTO' );

     

     

    • Paul.Dunbar
      Paul.Dunbar
      8 Posts
      ACCEPTED ANSWER

      Re: Retreiving BLOB content from column

      ‏2014-03-18T16:16:27Z  in response to YuanFeng

      I see.  I was hoping that the Data Studio representation was somehow usable.

  • Paul.Dunbar
    Paul.Dunbar
    8 Posts
    ACCEPTED ANSWER

    Re: Retreiving BLOB content from column

    ‏2014-03-25T16:40:55Z  in response to Paul.Dunbar

    As a follow-up, it seems that Data Studio presents BLOB values as hexidecimal.  I'm not sure if it limits how much of the value is presented, but for my purposes I'm able to get what I need.

  • Paul.Dunbar
    Paul.Dunbar
    8 Posts
    ACCEPTED ANSWER

    Re: Retreiving BLOB content from column

    ‏2014-03-25T16:44:23Z  in response to Paul.Dunbar

    As a follow-up, it seems that Data Studio presents BLOB values as hexidecimal.  I'm not sure if it limits how much of the value is presented, but for my purposes I'm able to get what I need.

    Updated on 2014-03-25T16:44:33Z at 2014-03-25T16:44:33Z by Paul.Dunbar