Error Codes and Logs

Microsoft SQL Server Virtual Backup

Microsoft SQL Server Virtual Backup Device Specification

Error Codes and Logs

The I/O completion codes are returned as part of command completion. These are appropriate WIN32 codes.

The virtual device methods return the COM standard of HRESULTS. The caller can use SUCCEEDED or FAILED macros to determine if the function failed.

Errors from WIN32 functions will be encoded as HRESULT_FROM_WIN32(). This is defined in the file Winerror.h. Another useful function: GetScode() is also defined in Winerror.h. The GetScode() function can extract a WIN32 status code from a WIN32-HRESULT.

VDI error messages are now stored in the Windows application event log. Look for events with the source "SQLVDI". A regkey is available to turn off VDI error logging:

under HKLM\Software\Microsoft\SQL Virtual Device Interface

Create a REG_SZ value with name "Log File", but leave the string null.

In SQL Server 2000 Service Pack 4 (SP4), this key could be used to redirect VDI.LOG to another location.

In SQL Server 2005, this key just controls whether or not VDI errorlogging is enabled.

Refer to vdierror.h for the list of errors.