FileStream – High Number In The Num_Unprocessed_Items Column After Running Garbage Collection

First, I am by no means a FileStream expert.  I am a DBA that was thrown a FileStream support ticket.

Problem, the developer ran the delete from the filestream table, but the files were still on the operating system disk taking up space.

When I first ran the sp_filestream_force_garbage_collection, I saw that I had a high number in the num_unprocessed_items column.

At that point I took a full backup of the database.  Then I ran the sp_filestream_force_garbage_collection, and saw that number moved to the num_collected_items column.

 At that point I took a log backup, and again reran the sp_filestream_force_garbage_collection.  It took a couple of seconds to process, but then returned zeros for all the columns.  Also the space was freed up on the drive.

Leave a Comment