October 13, 2021 at 12:49 pm
I read in an article that If the database is being restored with NORECOVERY, the Undo phase is skipped. I would like to know why it is skipped(what is the logic) and what will happen to the uncommitted transactions.
October 13, 2021 at 2:38 pm
I believe the reason it is skipped is because the next restore step MAY include the steps that the undo phase would have undone. If you use NORECOVERY, SQL is expecting another backup file to be included in the backup set. For example, if you restored from 1 full backup and 6 transaction log backups, you wouldn't want it to be "recovered" after the full backup or you wouldn't be able to apply the transaction log backups.
If you use NORECOVERY, the database is not in a useable format until you restore with recovery.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply