0

I'm trying to perform VSS restore of two different databases on the same host. Here is documentation of SQL on how the restore process works

To perform VSS operations, I'm using the VSS requestor sample code provided by Microsoft

When I do restore of a single database, it works fine. But, if I kick off two separate processes two perform restore of two databases, it doesn't work. For the second database, it fails at the post restore step and this warning is present in event viewer logs:

A VSS writer has rejected an event with error 0x00000000, The operation completed successfully. Changes that the writer made to the writer components while handling the event will not be available to the requester. Check the event log for related events from the application hosting the VSS writer.

Operation:
PostRestore Event

Context:
Execution Context: Writer
Writer Class Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
Writer Name: SqlServerWriter
Writer Instance Name: Microsoft SQL Server 2019:SQLWriter
Writer Instance ID: {5fd43d01-8c1f-4491-aeca-53e6b90a82eb}
Command Line: "C:\Program Files\Microsoft SQL
Server\90\Shared\sqlwriter.exe" Process ID: 3396

Is there some restriction that only one VSS process can run at a time? If yes, what is a workaround for this? (I think I can kick-off two restores as part of same VSS restore process but for my usecase I want to able to do this in separate processes)

Here are the steps I performed:

  1. Took VSS backup of the two databases at once and stored the xmldoc file created.
  2. Kick-off two VSS restores and added some sleep in between pre and post restore by passing some sleep in the -exec flag.
  3. At then end, only one VSS restore was successful. Second one failed at post restore.
Dale K
  • 25,246
  • 15
  • 42
  • 71
Kanak
  • 13
  • 2

0 Answers0