Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using SQL Server 2012 Express Edition and I have a problem with huge amount of files generated in:

C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\MyDatabaseStream_Filegroup_Data\$FSLOG\

It is generating roughly 150 files per minute and taking so much disc space on C Drive. Size of MyDatabaseStream is growing rapidly quick and making C Drive full (around 140GB)

How can I stop generating those files?

enter image description here

share|improve this question

Make a backup. Those are not log files - where did you get this idea from?

Yu basically store some data in the file system - MyDatabaseStream_Filegroup_Data\$FSLOG\

Database FIleStream feature. VERY nice if you (a) know what you do there and (b) need it.

Either you back up - thzen surplus can be deleted - or you move it to another disc or.... you disable file stream storage.

share|improve this answer

You would stop generating them by disabling FileStream feature.

I have not heavily used FileStream that much so I had to go look up how it all worked. I came across a nice blog post on the CSS SQL Server Engineers blog. This may shed some light on why those files are generated:

The gist of what I understand from the above...

The files in this directory are log files for the database. However they may not the be the same type of log files you are thinking. These are actually tied to the LSN number of the associated transaction that modifies the image. You will basically get a file generated for before it was modified, and then one for after it was modified.

The garbage collection process will keep up with which of those files can be cleaned up and are no longer needed. This is a feature built into FileStream and is handled internally by SQL Server. One of the methods that can cause this process to kick off is taking a FULL or LOG backup of the database. The article above shows taking a backup and issuing a CHECKPOINT. You may not see all the files removed immediately but you should start seeing a few go here-and-there.

Something to note based on the large number of files being generated is to increase your log backup frequency to account for the activity. As well it is best practice to keep SQL Server files separate from the OS drive, prime example of why in your case.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.