Situations in which a restore operation is interrupted are not very uncommon.
This is why, in this post, we will show you what you have to do in order to restart the interrupted operation using T-SQL queries. In case your restore operation was interrupted, you can still restart the process and continue from that point where it got interrupted.
This is a feature that can be very useful if you have very large databases which you have to restore. In case the process of restoring fails close to the end, most of the time you can restart the entire operation from the point where it left off, instead of restarting the entire restoration process of the database.
To be specific, at the time when you make your restore from tape, you can restart from the current tape instead of restarting from the first one. But, if the restore was in the phase when it was being rolled forward, then no data will be copied from that backup set.
Restart interrupted restore with T-SQL
If you have used a T-SQL query to restore your database and the process was interrupted for any reason, known or unknown, then what you have to do is to specify a RESTART
clause at the end of the same query and run the query once more.
Let’s assume that you have the following query, or something similar, and it got interrupted during execution.
-- Restore a full database backup of myDB database RESTORE DATABASE myDB FROM DISK = 'C:\myDB.bak' GO
Now, in order to continue and restart interrupted restore operations, applied in our case, we are going to use the query from above finished with the WITH RESTART
clause.
-- Just run the initial RESTORE statement specifying WITH RESTART in order to restart interrupted restore operations RESTORE DATABASE myDB FROM DISK = 'C:\myDB.bck' WITH RESTART GO
its great post….
Thank you! Please feel free to read other articles and come back as we will continue to add content that might help you at some point.