Problem description
MS-SQL differential backups fail, and the error code reported on the Druva console is SQL49.
When reviewing the mssql_plugin_job.log from the detailed job logs bundle, the following errors are present, indicating that the VSS writer is not in a stable state:
level=error filename=vssbackuphelper.go method=checkWriterStatus message="Writer state is not stable"
level=error filename=vssbackuphelper.go message="Error in checking writer status" Error="message: Writer state is not stable."
Simultaneously, the Windows Application Event Log on the SQL server records corresponding errors from the SQLWRITER source. These events explicitly state that a differential backup cannot be performed because a current full database backup does not exist.
Example Application Event Log entry:
Source:
SQLWRITER
Event ID:
24583
Level:
Error
Message:
BACKUP DATABASE is terminating abnormally.
Message:
Cannot perform a differential backup for database "MyDatabase", because a current database backup does not exist. Perform a full database backup by reissuing BACKUP DATABASE, omitting the WITH DIFFERENTIAL option.
Cause
The root cause of the SQL49 error is the absence of a recent and valid full backup for the SQL database. Differential backups rely on a preceding full backup as a baseline.
When the Druva agent initiates a differential backup, the SQL VSS writer first checks for this baseline. When it cannot find a valid full backup, it intentionally fails the operation. This failure is reported in the logs as the writer being in an "unstable state," even though the instability is a direct result of the missing prerequisite and not necessarily a persistent VSS writer issue.
Traceback
Below are the typical log entries associated with this issue.
Druva mssql_plugin_job.log:
level=error filename=vssbackuphelper.go:2492 method=checkWriterStatus message="Writer state is not stable" WriterState=8 Error=null
level=error filename=vssbackuphelper.go:1521 message="Error in checking writer status" Error="message: Writer state is not stable.
Application Event Log Error:
Log Name: Application
Source: SQLWRITER
Event ID: 24583
Level: Error
Description:
Sqllib error: OLEDB Error encountered calling ICommandText::Execute. hr = 0x80040e14. SQLSTATE: 42000, Native Error: 3014
Error message: BACKUP DATABASE is terminating abnormally.
SQLSTATE: 42000, Native Error: 3035
Error message: Cannot perform a differential backup for database "MyDatabase", because a current database backup does not exist. Perform a full database backup by reissuing BACKUP DATABASE, omitting the WITH DIFFERENTIAL option.
Resolution
The solution is to run a new full backup to establish the required baseline. Before initiating the backup, it's good practice to check the VSS writer's current state.
Check and Stabilize VSS Writers (If Needed)
On the affected SQL server, open PowerShell or Command Prompt as an Administrator.
Run the command to check the status of all VSS writers:
vssadminlistwriters
Find the Sqlserverwriter in the list. If its State is [1] Stable and Last error is No error, proceed to the next step.
If the writer is in a Failed state, try restarting the necessary services to reset it. Open services.msc and restart the following services in order:
SQL Server VSS Writer
Volume Shadow Copy
Initiate a Manual Full Backup
Log in to your Druva console and navigate to the MS-SQL server.
Select the database(s) configured in the backup set that is failing.
Trigger an on-demand backup and ensure you select the Full Backup option. This will create the baseline that the SQL writer requires.
Alternative: Schedule a Full Backup
If you cannot run a manual backup, review the backup policy assigned to the SQL server.
Ensure the policy is configured with a recurring schedule for Full backups (e.g., weekly) to prevent the issue from happening again.
Verification
Follow these steps to confirm that both the backup issue and the reported writer instability are resolved.
Confirm Backup Success
Monitor the full backup job in the Druva console. A Successful status confirms the new baseline has been created.
After the full backup succeeds, either wait for the next scheduled differential backup or trigger one manually. A successful differential backup without the SQL49 error confirms the primary issue is resolved.
Confirm VSS Writer Stability
This step is crucial to confirm the "Writer state is not stable" error was only a symptom.
After the full backup has completed successfully, run the VSS writer status command again on the SQL server:
vssadminlistwriters
The Sqlserverwriter should now consistently report its State as [1] Stable and Last error as No error. This proves that the instability was directly caused by the missing full backup and is now resolved. If the writer remains in a failed state, further VSS-specific troubleshooting may be required.