question

srivivek avatar image
srivivek asked

What happens if SQL Server gets restarted in middle of a Backup or restore database?

What happens if SQL Server gets restarted in middle of a Backup or restore database?
backup-restoresql-restart
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Do you mean purposefully restarted or the instance dies suddenly due to some other failure?
1 Like 1 ·

1 Answer

·
Wilfred van Dijk avatar image
Wilfred van Dijk answered
"It depends" (on the type of restart). If it's a clean restart the backup will abort and your databases are fine. The restore will also abort, leaving the database in a restoring state. If the restart is due to a power failure, the backup and restore will abort and MSSQL has to recover your existing databases. The database to be restored will be in a restoring state. A restoring state is pretty useless, so if you abort a restore, you'll have to restart again
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.