drv
drv

Reputation: 125

How to restore database programatically from backup with multiple files

I have no problem with restoring database programatically (in C# using SMO) from backup containing one file. But when the backup contains multiple files (full and differential backups) I get the following error

The log or differential backup cannot be restored because no files are ready to rollforward

So what should I do to restore database with the latest data?

Upvotes: 0

Views: 719

Answers (1)

Mykre
Mykre

Reputation: 56

You will need to set the NoRecovery Option so that it will allow you to restore the rest of the files.

Check this for reference.

Upvotes: 1

Related Questions