Solved

Periodic cleaning up for files created by SQL filestream.

Posted on 2011-09-23
3
339 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 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