Search code examples
c#sqldatabaseazureblob

How to sync Azure SQL with Azure BLOB Storage?


I have files which are saved in Azure Blob storage, and i have a database which keeps URIs of those files. Is there any standart way to sync them? I mean that there should be no way to delete file without deleting record in the database and vise versa.


Solution

  • There is no out of the box way of doing this, so you need to write your own. I found this file monitor example useful: http://ben.onfabrik.com/posts/monitoring-files-in-azure-blob-storage

    2022 Update As pointed out in comments, in the decade since this answer was posted, the link has gone dead. The wayback machine has it here: https://web.archive.org/web/20130629015900/http://ben.onfabrik.com/posts/monitoring-files-in-azure-blob-storage

    Given the many changes to Azure since 2012, it is highly doubtful that this is still the best way to solve this problem.