Store Raster files(Images) in SQL SERVER RRS feed

  • Question

  • User-2141666569 posted

    Dear All,

    As I am new to SQL SERVER, i need your help to store my data which in raster format(images) into SQL SERVER 2016.

     All suggestions are highly appreciated.


    Monday, July 23, 2018 9:49 AM

All replies

  • User753101303 posted


    You should find tons of turorial. The "old" advice was to store a "path" in your db and the file in the file system but you could consider now to use https://www.mssqltips.com/sqlservertip/1489/using-filestream-to-store-blobs-in-the-ntfs-file-system-in-sql-server-2008/ that basically does this for you.

    You can also save the db with or without file data and access them through a file share if needed.

    Monday, July 23, 2018 9:55 AM
  • User-2141666569 posted

    Dear PatriceSC,

    Thanks for your reply, i have already tried file stream method. But when I am trying to retrieve the raster data from third part software(ERDAS APOLLO) its throwing error as.

    "No Geometry found in table".

    Please suggest.

    Monday, July 23, 2018 10:03 AM
  • User753101303 posted

    Seems unrelated. This 3rd party system seems to process spatial data and so more likely it expect https://docs.microsoft.com/en-us/sql/relational-databases/spatial/spatial-data-sql-server?view=sql-server-2017 columns into your table.

    Monday, July 23, 2018 10:37 AM
  • User-2141666569 posted

    Thanks Patrice for your valuable time.

    Monday, July 23, 2018 11:06 AM
  • User347430248 posted

    Hi imtiyazhmed2... ,

    Is your issue solved?

    From your last post, It is not clear that whether your issue is solved or not.

    If you got the solution then I suggest you to mark the helpful reply as an answer. So that we can close this thread from our side.

    If your issue is still persist then try to update the status of this thread.

    We will try to provide further suggestions to solve your issue.



    Wednesday, July 25, 2018 6:36 AM
  • User-2141666569 posted

    Dear Deepak,

    Thanks for your reply, the issue is still up, As my RASTER DATA ( .tif, .img, .dem) file has spatial references. Can you please suggest me how to store this data in SQL server with spatial references.

    (The reason i am asking for spatial references because i want to retrieve this data in third party software ERDAS APOLLO DATA MANAGER, which is throwing error if i am storing data under filestream).

    Thanks and Regards


    Wednesday, July 25, 2018 6:55 AM
  • User347430248 posted

    Hi imtiyazhmed2..,

    I try to find the documentation to save the spatial references with raster data but i did not get any useful article on that.

    I suggest you to contact your third party software company to provide any work around for this issue.



    Friday, August 3, 2018 6:14 AM
  • User-595703101 posted

    To manage binary data on SQL Server the easiest way is to keep it in FileTables

    FileTables are exposed to use of others just like a Windows File folder so you can simply drag and drop images into those files.

    By enabling FileStream feature of SQL Server the FileTable can be reachable in a folder under the default network share for that instance FileStream

    Additionally, backup and restore operations of the image files are managed like data of your database seemlessly at the same time. This eliminates the loss of images kept in file folders on the other hand data is in database. Developers can miss the synchronization in previous methods.

    But with used of FileStream and FileTables actually the images you see on the FileStream folders are actually kept in special database tables FileTable

    Friday, August 3, 2018 7:22 AM