Solved

Periodic cleaning up for files created by SQL filestream.

Posted on 2011-09-23
3
330 Views
Last Modified: 2012-06-27
I added a filestream column in one of the sql tables.

I am storing word documents into that column - from the web using ASP.net functions.

I am able to store and retrieve the files from the filestream column. My concern is that, every time I add or modify the files, it creates lots of physical files in the associated folder. Is there a best way to periodically cleanup theose files (that were created as part of the filestream).  

I found few methods from my search. But most of them are unclear.

Thanks,

RP
0
Comment
Question by:SasDev
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
G_H earned 500 total points
ID: 36587876
Just to be clear, where are these files, and is there a reason for not cleaning them up at the end of "store into DB"?

GH
0
 
LVL 1

Assisted Solution

by:SasDev
SasDev earned 0 total points
ID: 36588899
The files are automatically created by the SQL server.

They are stored on the same folder where the database files are stored (ProgramFiles\MicrosoftSQLServer\MSSQL10.MSSQLSERVER\MSSQL\Data\[specific database name]).

Inside the specific database sub folder, there is one subfolder with the name $FSLOG, a file with the name filestream.hdr and several other subfolders (they are all automatically created as part of the filestream updates).

Regarding cleaning up - that is my main concern. We cannot simply delete these files. We need to check if the are old enough to be deleted. I believe SQL has a command. But I am not clear whether we need to run that command manually. If so, when we need to run?

Thanks,

RP
0
 
LVL 1

Author Closing Comment

by:SasDev
ID: 36935113
Resolved. The SQL server does this automatically and so no action needed by the user unless there are some space issues in the database.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now