Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Periodic cleaning up for files created by SQL filestream.

Posted on 2011-09-23
3
Medium Priority
?
361 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
G_H earned 2000 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 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