Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

SqlServerWriter missing from vssadmin list writers: what it means for VSS backups of SQL Server

Technical article
Backup & Recovery

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

When SqlServerWriter is absent from vssadmin list writers, a backup product that uses the Volume Shadow Copy Service (VSS) has nothing from SQL Server to coordinate with. Common causes include that the SQL Writer service is stopped or disabled, that it is not running as Local System, or that a database name contains leading or trailing spaces or non-printable characters. Find which one applies first. Microsoft's warning for a disabled writer is that utilities relying on VSS snapshots "can break, and might risk taking backups of databases that aren't consistent".

What the error means

VSS is a framework in which a requestor (the backup application) asks writers (applications such as SQL Server) to prepare for a snapshot. SQL Server's writer is the SQL Writer service. It "must be running when the Volume Shadow Copy Service (VSS) application requests a backup or restore" (SQL Writer Service).

The reason the writer matters is that the Database Engine "locks and has exclusive access to the database files". When the writer is not running, Microsoft says, Windows backup programs do not have access to the data files and backups must use native SQL Server backup. When it is running, it tells the backup application which database files to include, then freezes database I/O for the snapshot and thaws it after (Volume Shadow Copy Service and SQL writer). Microsoft does not spell out exactly what a snapshot taken without the writer contains. Its wording is that such backups "might" be of databases "that aren't consistent", so treat any such snapshot as unproven until a restore test passes.

Three other points from the same guide shape the diagnosis:

  • A snapshot of a SQL Server database taken through VSS "is in a non-recovered state" and must go through recovery before it can be used safely. The writer can perform that recovery as part of snapshot creation if the requestor asks.
  • The writer detects "torn" databases, where the files of one database are spread over volumes that are not all in the snapshot, and fails the backup.
  • The writer does not support log backups, file and filegroup backup, or page restore, and ignores database snapshots.

Example (illustrative): on SQL01, a backup agent reports that it could not find the SQL writer. vssadmin list writers lists the system writers but no SqlServerWriter entry. The SQL Writer service turns out to be running, but one database is named SalesDB with a trailing space.

Likely causes

Cause What you see How to confirm
SQL Writer service stopped SqlServerWriter absent from vssadmin list writers Check the service state
Service disabled on purpose (for example after a hardening exercise) Same, and the startup type is Disabled Check the startup type. Microsoft says the service can be disabled if only Transact-SQL backups are used
Service not running as Local System Writer absent or failing Open the service properties in the Services console and read the account
NT SERVICE\SQLWriter login missing or not a sysadmin Writer fails to work with SQL Server Query sys.server_principals; check role membership
Database name has leading or trailing spaces or non-printable characters SqlServerWriter absent from the list while the service runs Run Microsoft's name-check query below
SQL Server instance not running at the moment of enumeration That instance's databases cannot be selected Check the instance state at the backup time
SQL Server on Linux No writer exists Microsoft states Linux has no VSS framework

Prove the cause before changing anything

These are read-only and have not been run or lab-tested. The queries in steps 4 and 6 are built from documented columns, not copied from Microsoft examples.

  1. List the writers.
vssadmin list writers

Look for SqlServerWriter, the writer name Microsoft gives in its metadata description. This only tells you presence. A writer in a failed state is a different problem, covered by the article on VSS writer failures.

  1. Check the service. The Set-Service page shows this line for reading a service's name, startup type and status:
Get-Service -Name SQLWriter | Select-Object -Property Name, StartType, Status

If the command does not return a startup type on your PowerShell version, use the Services console and read the startup type there.

  1. Check the account. Microsoft requires that the service "must run under the Local System account". Read the account in the service properties.
  2. Check the login in SQL Server.
SELECT name, type_desc, is_disabled
FROM sys.server_principals
WHERE name = N'NT SERVICE\SQLWriter';

The writer uses this login and needs sysadmin permission because it briefly freezes all I/O. Confirm role membership with your normal method for listing sysadmin members.

  1. Check database names. This query comes from Microsoft's support article on VSS backups failing for databases with unusual names. It wraps each name in ## so spaces become visible:
SELECT database_id AS DatabaseID, '##'+name+'##' AS DatabaseName FROM sys.databases

Non-printable characters may show as spaces or junk.

  1. Check for auto-close. Microsoft lists auto-close databases in two ways (see Risks and limits), so identify them:
SELECT name, is_auto_close_on, state_desc FROM sys.databases;

Fix

Fix the cause you confirmed. Run changes outside the backup window, because the writer is part of the backup path.

Service stopped or disabled. Microsoft's own instruction is to mark the SQL writer service as Automatic in the Services console and then start it. The documented PowerShell equivalent, which needs an elevated session, is:

Set-Service -Name SQLWriter -StartupType Automatic
Set-Service -Name SQLWriter -Status Running

Before enabling it, ask why it was disabled. Microsoft says the service can be "safely disabled" only where nothing needs anything besides Transact-SQL backup, including the host or virtualisation layer. If a VSS-based product backs this server up, the service must run.

Wrong account. Set the service back to Local System, and confirm that NT SERVICE\SQLWriter is a member of sysadmin. Microsoft states both as requirements and gives no repair script on the page, so have a database administrator make the change by the documented method.

Unusual database name. Microsoft's resolution is: "Rename all databases that contain either leading or trailing spaces or unprintable characters in their names." Renaming a database changes what applications, jobs and scripts must connect to, so plan it with the application owners.

Instance not running at enumeration. Make sure the instance is started before the backup begins. Microsoft states that if an instance is not running when enumeration occurs, none of its databases can be selected.

Version drift. The SQL Writer service is shared across versions and instances on a server. Microsoft explains that installing or upgrading to a higher version can replace the writer file with the installation package's file, and that this can replace a newer cumulative-update version with an older one, in which case you apply the latest cumulative update to the new instance.

Linux. There is no VSS on Linux. Use a different consistency method, such as the native SQL Server backup commands.

Confirm the fix

  • vssadmin list writers shows SqlServerWriter.
  • The service shows Running with an Automatic startup type, and the databases you need appear in the backup tool's selection list.
  • Run a VSS backup, then restore it to a separate test server and bring the database online. Remember Microsoft's note that a VSS snapshot is non-recovered and needs recovery. A list entry shows that the writer exists, not that a restore works.
  • Check the result against the sibling article on application-consistent backups for the virtual machine layer.

What to watch afterwards

  • After SQL Server installs, upgrades and cumulative updates, re-check the writer, because the shared service file can be replaced.
  • Add SqlServerWriter presence to post-patch checks.
  • Treat any hardening change to services or to the NT SERVICE\SQLWriter login as a backup change, and test a restore afterwards.
  • Check new databases for names with stray spaces, and for auto-close settings.
  • SQL Server 2025: Microsoft states the SQL VSS Writer supports TDS 8.0, defaults to Encrypt=Mandatory with TrustServerCertificate=No, and so requires a valid server certificate for the TLS handshake. If you change encryption settings on a 2025 instance, retest the writer.

Risks and limits

  • The commands here follow Microsoft documentation and have not been run or lab-tested.
  • Microsoft's guide lists auto-close databases under what is not supported, while its table marks "Autoclose databases" as supported for component-based backup and not for non-component-based backup. The special-cases section says auto-closed databases are not explicitly frozen in non-component backups. These statements are not fully consistent, so test your own configuration.
  • Microsoft documents no database count limit and does not describe how offline databases are handled by the writer.
  • A missing writer has several causes. The pages describe what each requirement is, but do not say what the symptom is when a given requirement is broken, apart from the database name case.
  • Basic availability group secondaries are not backed up with a virtual machine from SQL Server 2016 SP2 CU2 and 2017 CU9 onward; earlier builds fail the backup.

Sources