Various ODBC File Data Type Images must be written in the proper format on to disk. SQL Server 2012 Enterprise

  • Hello Folks.
    In a table are stored over 1 million ODBC documents (doc, pdf, excel ). I want to write all this documents on to disk in the correct format. The format is given by an attribute in the table. So I can identify the format by this id. My problem is to find a writing method in SQL Server, which allows me to write the right format.

    Although I found this: EXEC sp_OACreate 'ADODB.Stream', I did not find a method to write the file in the right format.

    Can anibody help?

    Regards
    Alphanew

  • do you have all three elements needed, the binary image, the filename and extension in your table?

    SQL Server itself does not have tools for sending data to files, you need to use something outside of SQL server.
    so using the adodb.stream example is one way, powershell, ssis, a programming language.
    here's an article that has an SSIS package you could modify that does what you are asking:
    https://www.mssqltips.com/sqlservertip/2693/export-images-from-a-sql-server-table-to-a-folder-with-ssis/

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks for helping.
    I will have a look.
    Greetings
    Alphanew

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply