This article applies to:
OS: Windows Server
Product edition: Phoenix Cloud and Gov Cloud
Problem description
SQL Backup fails with error VSS10. This article explains the reason behind this behavior and its solution. Sometimes, SQL backups fail when VSS SQL writer goes missing from the writers' list intermittently. The backups run fine after the VSS service is restarted but the issue reoccurs in a few days.
Cause
This error can occur due to the following reasons:
Crash in a Service Host (SVCHOST.EXE). The critical one being the COM+ Event System (EventSystem), which is the glue for the VSS writer. Even if the COM+ Event System immediately comes online, SQL Writer does not detect the failure and again initialize with VSS Writer (neither does the BITS service). Restarting the SQL Writer service corrects the issue but with manual intervention.
SQL server VSS Writer is running under the user with insufficient privileges.
SQL database contains spaces.
System state misconfiguration.
Traceback
Event log
F
Faulting module name: KERNELBASE.dll, version: 10.0.14393.0, time stamp: 0x57899809
Exception code: 0xe0434352
Fault offset: 0x0000000000017788
Faulting process id: 0x669c
Faulting application start time: 0x01d399f429d91ee2
Faulting application path: C:\Program Files\Microsoft SQL Server\130\Shared\SQLSQM.EXE
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: d9f54e1c-1b92-4413-ba5d-7354fb00032b
Faulting package full name:
Description:
The process was terminated due to an unhandled exception.
Phoenix.log
Location:C:\programdata\Phoenix\SQL
[2020-02-07 21:41:47,069] [INFO] Initialized for backup
[2020-02-07 21:41:49,568] [INFO] Status after gathering: 0x10004230aL
[2020-02-07 21:41:49,736] [ERROR] SyncError : VSS Writer count mismatch.
[2020-02-07 21:41:49,736] [ERROR] Error <class 'inSyncLib.inSyncError.SyncError'>:Required writers count for VSS operation is not correct, current writer count = 0, required writer count = 1 (#10004000a) (Error Code : VSS10). Traceback -Traceback (most recent call last):
SyncError: Required writers count for VSS operation is not correct, current writer count = 0, required writer count = 1 (#10004000a) (Error Code : VSS10)
[2020-02-07 21:41:57,878] [INFO] Did not get SQL discovery info to update
Resolution
📝 Note
Ensure that an SQL administrators performs the following steps:
For a more robust resolution of this issue, load the COM+ Event System (EventSystem) into its own SVCHOST so that it does get impacted by problems form other services.
From the admin command prompt, run:
sc config EventSystem type= own
This requires an OS reboot to take effect.
From the administrator command prompt of the SQL server, run the following command:
vssadmin list writers
If the output does not show ‘SqlServerWriter’, check the following options:
Restart the ‘SQL Server VSS Writer’ service under services.msc
Run the following query from SQL Management Studio to check whether the database contains any spaces.
select '#' + name +'#' from sys.databases
For example,If you get the result with #Druva #, remove the space from the database name.
Ensure that the service account under which “Druva Agent service” is running, has the ‘sysadmin’ permissions.
If the SQL Server is a Hyper-V Virtual Machine.
Restart the HyperV 'Virtual Machine Management Service' Service on the Hyper-V Host.
Verification
After the OS reboot, verify whether the EventSystem is in its own SVCHOST with:
tasklist /FI "IMAGENAME eq svchost.exe" /SVC