Recovery pending after Azure virtual machine stopped / started
GregTrevellick
Posts: 8 New member
in SQL Clone
We have multiple DBs on an Azure VM, most are cloned DBs and some are stand-alone.
After a nightly cost-saving shutdown of the SQL Server VM, the next day the stand-alone DBs are fully accessible but cloned DBs are stuck in "Recovery Pending" state for some significant time period given the volume of cloned DBs we have.
The SQL Clone Agent is started.
Is there anything we can do to stop this without keeping the VM online 24/7?
After a nightly cost-saving shutdown of the SQL Server VM, the next day the stand-alone DBs are fully accessible but cloned DBs are stuck in "Recovery Pending" state for some significant time period given the volume of cloned DBs we have.
The SQL Clone Agent is started.
Is there anything we can do to stop this without keeping the VM online 24/7?
Best Answers
-
Eddie D Posts: 1,800 Rose Gold 5Hi,
Thank you for your forum post.
The SQL Server instance that hosts your clone databases, believes it connects to a normal database with local files that it can read and write too. It has no understanding of SQL Clone processes in the background. Each clone database's data has been virtualized. In other words, without SQL Server being aware of it, a clone's database files are not local; the database and its data (i.e. its data and log files) are held in the image VHD, in a shared folder on the network.
Each time you perform your shut-down the link between each clone and the image VHD file is broken. So when you restart the Azure VM, each clone needs to reestablish the link to the image VHD from which the clone was created. Until the connection to the image VHD is reestablished, the clone databases will be stuck in "Recovery Pending" state. Sadly there is nothing that can be configured to prevent this from occurring if you wish to shutdown the Azure VM each night.