|SQL Server Instance (VDI Server)||Backup Application (VDI Client)||Behavior|
|Supports VDC_Complete||Supports VDC_Complete||Client has to request VDF_RequestComplete while fetching the configuration to let the server know that it understands VDC_Complete. Once the server sends back a confirmation using the VDI configuration that it supports VDC_Complete, the client needs to execute the appropriate code path to handle VDC_Complete|
|Supports VDC_Complete||Does not support VDC_Complete||Since client does not request VDF_RequestComplete while fetching the configuration, server proceeds using previous behavior to maintain backward compatibility|
|Does not support VDC_Complete||Supports VDC_Complete||Server will return a NULL response because it does not support VDC_Complete for the requested feature VDF_RequestComplete|
|Does not support VDC_Complete||Does not support VDC_Complete||Behaves with legacy behavior of using only VDC_Flush|
// Setup the VDI configuration we want to use.
memset (&config, 0, sizeof(config));
config.deviceCount = 1;
// Request for VDC_Complete feature from the server
config.features = VDF_RequestComplete;
Once the client receives the configuration, it needs to check the features available (see below) by determining if VDF_CompleteEnabled is set. Once the client determines that the server supports VDC_Complete, it can execute the code path which does the appropriate processing (end of backup book keeping, closing the backup etc.) after it receives the VDC_Complete message.
hr = vds->GetConfiguration (10000, &config);
if (!SUCCEEDED (hr))
printf_s ("\nError: VDS::Getconfig fails: 0x%X\n", hr);
if (hr == VD_E_TIMEOUT)
printf_s("\nError: Failed to retrieve VDI configuration due to timeout value (10,000 ms).\n");
// Determine if the server supports VDC_Complete based on configuration parameters returned
if (!(config.features & VDF_CompleteEnabled))
printf_s("\nServer does not support VDC_Complete.");
printf_s("\nServer supports VDC_Complete.");
When the backup application receives a VDC_Complete, the backup application will need to harden the backup and complete book keeping tasks before it acknowledges success for the VDC_Complete message (see below). This will ensure that SQL Server does not advance the LSN without the client application hardening the backup which could lead to a potential data loss situation.
// Ensure that book keeping is completed.
printf_s("\n\nSQL Server has signaled the end of the operation.");
// Harden the backup and close the file
completionCode = ERROR_SUCCESS;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.