1

I would like to force SQL Server database to go in recovery mode when restoring from disk image snapshot. Any suggestions to force a single or group of databases in recovery so that additional transactional logs can be applied?

5

Not possible. Recovery mode means that redo was performed but not undo i.e., you need a prior restore operation.

A snapshot backup can be used as a base for restoring log backups (Veeam does it) but I don't think it is possible outside the VDI API.

There is no T-SQL API to attach a database with NORECOVERY. Vote for the feature here.

1
  • The workaround I have found is to take a snapshot of Always On databases and attach the disks from that snapshot to another instance along with all of the databases. SQL Server will detect that the database was part of the Always-On group and will consider it a split-brain scenario. In this case, it will put the database in no recovery. My question is how can this be done for non-always-on databases?
    – Data Tale
    Jun 21 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.