?
Solved

Deleting Filestream BLOB and underlying files on filesystem

Posted on 2009-02-19
2
Medium Priority
?
782 Views
Last Modified: 2012-08-13
Hey all

I've deleted rows in my database table, containing a filestream column. My issue is that it does not delete the underlying files on the filesystem, even though MSDN and other sources say that it is supposed to work.

Is there any way that the underlying files can be deleted immediately along with the rows in the database?

Thanks
0
Comment
Question by:culminIT
2 Comments
 
LVL 22

Accepted Solution

by:
dportas earned 2000 total points
ID: 23686881
"FILESTREAM garbage collection is a background task that is triggered by the database checkpoint process. A checkpoint is automatically run when enough transaction log has been generated. For more information, see the SQL Server 2008 Books Online topic CHECKPOINT and the Active Portion of the Log (http://msdn.microsoft.com/en-us/library/ms189573.aspx). Given that FILESTREAM file operations are minimally logged in the databases transaction log, it may take a while before the number of transaction log records generated triggers a checkpoint process and garbage collection occurs. If this becomes a problem, you can force garbage collection by using the CHECKPOINT statement."

http://msdn.microsoft.com/en-us/library/cc949109.aspx
0
 

Author Closing Comment

by:culminIT
ID: 31548662
Thank you for your help
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question