通过物理文件,我的意思是sqlServer的托管目录中的文件,其中uniqueidentifer作为文件名,而不是原始文件添加到dbase.
有人知道sqlServer是否会最终删除该文件?如果从dbase中删除了大量文件,我希望能够快速回收这个空间.
谢谢,
戴尔
解决方法
相反,sql Server运行一个垃圾收集器,当它确定最终被删除时会清除旧的数据.
FILESTREAM
garbage collection is a background task that is triggered by the database checkpoint process. A checkpoint is automatically run when enough transaction log has been generated. For more information,see the sql Server 2008 Books Online topic “CHECKPOINT
and the Active Portion of the Log” (07001). Given thatFILESTREAM
file operations are minimally logged in the database’s transaction log,it may take a while before the number of transaction log records generated triggers a checkpoint process and garbage collection occurs. If this becomes a problem,you can force garbage collection by using theCHECKPOINT
statement.