SQL Server Restore Options Page – A Comprehensive Guide

restoresql server

enter image description here

Hello,
kindly can anybody tell me what is the difference between the 2 options (Recovery State and Leave Source Database in the restoring state (WITH NORECOVERY)), – see the snapshot below please – and When I have to check the option : Leave Source Database in the restoring state (WITH NORECOVERY)?
any help please,
Thanks in advance

Best Answer

When you restore a database you have the option to keep restoring additional files. Such as if you are going to restore a FULL backup and then additional LOG or DIFF files to bring the database up to date.

WITH NORECOVERY - Leave the database in a state that allows additional files to be restored.

WITH RECOVERY - Brings the database online and ready for transactions.

If you use the WITH NORECOVERY switch, you will need to issue the RECOVERY command yourself, either with the last restore or in a separate command "RESTORE DATABASE [dbname] WITH RECOVERY;"