-- Delete row #1
DELETE FROM PhotoAlbum WHERE PhotoId = 1
SELECT * FROM PhotoAlbum
-- Forcing garbage collection won't delete the file without a BACKUP if using FULL recovery model
EXEC sp_filestream_force_garbage_collection
-- Switch from FULL to SIMPLE recovery model
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'PhotoLibrary'
ALTER DATABASE PhotoLibrary SET RECOVERY SIMPLE
SELECT name, recovery_model_desc FROM sys.databases WHERE name = 'PhotoLibrary'
-- Forcing garbage collection will now delete the file immediately
EXEC sp_filestream_force_garbage_collection