Search code examples
sqlsql-server-2008filestream

SQL Server 2008: Filestream how to physically delete uploaded file from filestreamgroup?


I have created filestream group at C:\Test\FilestreamGroup1

and a table with varBinary Filstream column

Now when file is uploaded then it physically stored at FilestreamGroup1...

Now here I want to know two things

  • In which format file is stored at FilestreamGroup1 (for every single uploaded file I found 2 encoded file)?
  • secondly how to delete uploaded file physically (i.e. deleting a record from the table is like execute delete command, but doing this I'll not result in physical deletion of file from NTFS...so how can I delete a file physically)

Solution

  • If you want to delete files from FileSystem instanly then you need to force garbage collection manually by using checkpoint

    Link