Reputation: 61
What is the best alternative to Filestream BLOB data when moving to Azure SQL?
We are planning to move our local SQL Sever database to Azure SQL service. But we are using Filestream to store all our file attachments (which is not supported in Azure SQL). Is there any recommendations from Microsoft on this considering the performance, referential integrity and backups of BLOB data?
Do we have to go back to the old method of storing files on the file system and providing the url on the table? Any idea whether Filestream option will be available in a later releases of Azure SQL, or is this getting moved out?
Appreciate your valuable responses, thanks.
Upvotes: 5
Views: 7660
Reputation: 368
Hugo has the correct answer, but it is in his comment to his acknowledged misleading solution. So I'll reiterate and amplify: Azure SQL Managed Instance simply does not have an alternative to FILESTREAM and I would speculate that most developers that went the FILESTREAM route had already evaluated and discarded the varbinary option. So, you are left to develop your own, perhaps by using files in a Storage Account as mentioned. The downside is that efficiencies of blob operations and features such as automatic backup with SQL backup will be missing. The upside is that your solution may more easily adapt to other cloud services such as AWS.
Upvotes: 3
Reputation: 1398
Welcome Jacob. Filestream is not supported on Azure SQL Database, because of its nature PaaS. So, in case you do not want to change anything in your SQL Databases, you can consider to use Azure SQL Managed Instance. If you are using your filestream to just query your data, you can use the varbinary type instead of filestream on your table's columns. To migrate your SQL Databases to Azure SQL Managed Instance, please have a look to this article.
Upvotes: 2