• L' Eomot Inversé (9/5/2013)


    This question is somewhat confused and the answer is wrong.

    It says the files "not be removed immediately" and asks how to force this garbage collection to occur. The word "this" means something, and the only thing "this garbage collection" can be using as a referent for "this" is removing the files. As the garbage collector will do nothing with the files unless both the current checkpoint LSN and the last backup LSN are both beyond the LSN of the delete operation, and the files will only be removed when the garbage collector has processed them twice, causing the garbage collector to run will do nothing at all unless there has been both a checkpoint and a log backup since the delete operation, and even if this forced run occurs when the backup and checkpoint LSNs are both high enough it will not remove the files if it is the first such run, just mark their tombstones so that the next GC run will remove them.

    I disagree, Tom, and think you're being a little pedantic here. The question asked how can you force the garbage collection to run, not force it to delete files. The way SQL Server operates is not compromised by your forcing the GC process to run, which is what the questions asks.

    I have awarded back points because the original question did not mention SQL Server 2012.