• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 742
  • Last Modified:

convert binary file into readable format

hi ,
    I need to convert the binary data into the readable format (image or text etc..).

  Actually my table contains a field of datatype image. this field stores the attachments in the binary format. Because of these attachments data base size is growing rapidly. now i decided to convert these binary fiels into readable format and store them in a separate drive.if it's possible by using sql coding then i store only that path of the file in my table.

2 Solutions
Raja Jegan RSQL Server DBA & ArchitectCommented:
That's indeed a good decision from your end..
Check the link below which indicates how to retrieve Images from binary fields using T-SQL.


Once images are retrieved, then you can update the reference paths accordingly in your actual table.

PS: Make sure that your images location are included in your regular server backup plans.
Alpesh PatelAssistant ConsultantCommented:
Here is a very good post for creating files from binary data columns:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now