VDC_Flush

Microsoft SQL Server Virtual Backup

Microsoft SQL Server Virtual Backup Device Specification

VDC_Flush

This command is required. It is used by Microsoft® SQL Server™ to request that all previously received write operations are durably stored. During BACKUP operations, the client may cache the output data stream. SQL Server issues the Flush command when it must ensure that data is stored in a durable fashion.

If VDF_LikeDisk is being used, the end-of-file marker is implicitly set when the Flush command is received. Clients implementing a disk-like device must ensure that the file ends at the last position previously written. The SetEndOfFile() Windows function can be used to accomplish this. This is important for cases where a pre-existing disk file is being overwritten. For example, when the WITH INIT statement is used to overwrite an existing backup file and the new backup file is shorter than the original, then the Flush command should be used to set the end-of-file marker.