Skip to main content
SQL backup fails with VSS10 error

SQL backup fails with VSS10 error

Updated over a week ago

This article applies to:

  • OS: Windows Server

  • Product edition: Phoenix Cloud and Gov Cloud

Problem description

SQL backups occasionally fail with the error VSS10. This error typically occurs when the SQL VSS Writer intermittently goes missing from the writers' list. While restarting the VSS service temporarily resolves the issue, it reoccurs after some time. The backup fails to complete due to the mismatch in the required VSS writers, specifically the SqlServerWriter, which is not detected by the system.

Cause

The VSS10 error can be caused by several factors:

  1. Crash in a Service Host (SVCHOST.EXE): A crash in a critical service, such as the COM+ Event System (EventSystem), which handles the VSS writer, can cause the VSS writer to go missing. Even if the COM+ Event System comes back online, the SQL Writer might not reinitialize properly.

  2. SQL Server VSS Writer Running Under Insufficient Privileges: If the service account running the SQL VSS Writer does not have the necessary privileges, it can fail to register or initialize properly.

  3. SQL Database Containing Spaces in Its Name: The presence of spaces in database names can cause issues with the VSS backup process.

  4. System State Misconfiguration: Issues in the system state configuration, such as improper service dependencies or corrupt settings, can cause the VSS service to fail.

  5. Virtual Machine (Hyper-V) Configuration: If the SQL Server is running on a Hyper-V virtual machine, the VSS writer may be impacted by Hyper-V-related services, such as the Virtual Machine Management Service.

Traceback

SyncError: VSS Writer count mismatch.

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)

Additionally, the system logs and event logs may include details like the following:

Event Log:

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

This issue typically arises when the VSS SQL Writer is missing or fails to initialize correctly.

Resolution


πŸ“ Note
​ Ensure that an SQL administrators performs the following steps:


To resolve the VSS10 error and ensure successful backups, follow these steps:

  1. Ensure COM+ Event System is Running in Its Own SVCHOST:

    1. To prevent issues caused by other services impacting the COM+ Event System, configure the EventSystem to run in its own SVCHOST process:

      • Open an Administrator Command Prompt and run the following command:

      • sc config EventSystem type= own

      • Reboot the system for the changes to take effect.

  2. Verify SQL VSS Writer:

    1. After rebooting, verify whether the SQL VSS Writer is available by running the following command in the Administrator Command Prompt:

    2. vssadmin list writers

      • If SqlServerWriter is not listed, the SQL VSS Writer service is likely not running correctly.

      • To fix this, restart the SQL Server VSS Writer service from Services.msc.

  3. Check for Database Names with Spaces:

    1. Run the following query in SQL Server Management Studio to check if any database names contain spaces:
      ​SELECT '#' + name + '#' FROM sys.databases;
      If any database names appear with spaces (e.g., #Druva #), remove the spaces from the database name.

  4. Ensure Proper Privileges for Service Account:

    1. Ensure that the service account running the Druva Agent has the necessary permissions to access and back up SQL Server databases. The service account should have sysadmin permissions.

      • To verify, check that the service account is part of the sysadmin role in SQL Server.

  5. If Running on a Hyper-V Virtual Machine:

    1. If your SQL Server is hosted on a Hyper-V virtual machine, the Virtual Machine Management Service could be interfering with the VSS process. To resolve this:

      • Restart the Hyper-V 'Virtual Machine Management Service' on the Hyper-V host.

  6. Additional VSS Troubleshooting (Optional):

    1. You may also want to check the following settings:

      • Ensure that the VSS service is running:
        ​net start vss

      • Ensure that the VSS service is not in a hung or stuck state, and restart it if necessary.

Verification

After completing the above steps, verify the following:

  1. COM+ Event System Configuration: Ensure that the EventSystem is running in its own SVCHOST process by running:

  2. tasklist /FI "IMAGENAME eq svchost.exe" /SVC

  3. VSS Writers List: Run the following command to ensure that SqlServerWriter is listed:

  4. vssadmin list writers

  5. Check SQL Server Functionality: Run a backup job to ensure that the issue is resolved and the VSS writer is functioning correctly.

Conclusion

  • The VSS10 error during SQL backups can typically be resolved by ensuring that the SQL VSS Writer is correctly initialized and running under the appropriate service account.

  • Key steps include ensuring the COM+ Event System is running independently, restarting necessary services, checking for spaces in database names, and ensuring proper privileges.

  • If the SQL Server is on a virtual machine, restarting the Hyper-V services may also resolve the issue.

  • By following the outlined troubleshooting steps, you can restore proper functionality to your SQL backups and eliminate the VSS10 error.

See also

Did this answer your question?