Can you put an online database to restoring mode?

Viewed 3490

I have a database that is online, I want to change it to restoring mode, usually I do this when I restore a DB (WITH NORECOVERY).

1 Answers

As you mentioned, basically it's used during Backup restoration (specially LOG Restores). i.e. during full backup restoration it must be set with NO RECOVERY in order to proceed with LOG backup chain.

However, in case if you want the ONLINE database to be set RESTORING state, perform TAIL-LOG BACKUP (WITH NORECOVERY), your database must be in FULL RECOVERY model for this to happen. following example for the reference:

Backup LOG YourDBName to disk = 'C:\SQL-Backups\YourDBName.trn' WITH NORECOVERY
Related