Share via


File Restore Scenarios (Full Recovery Model) 

In a file restore, the goal is to restore one or more damaged files without restoring the entire database. For a file restore to succeed—for the files to be recovered and brought online—the restored files must be read-only at the time of backup and must be recovered to a state consistent with the current state of the database.

Under the full recovery model or bulk-logged recovery model, if the filegroup is read-write, an unbroken chain of log backups must be applied after the last data or differential backup is restored to bring the filegroup forward to the log records in the current active log records in the log file. The database will then use the current log to bring the filegroup to the current point in time (or to a specified point in time, marked transaction, or log sequence number). If the filegroup is read-only, applying log backups is unnecessary and is skipped.

Offline File Restore Scenario

Offline file restore is supported for all editions of SQL Server. In an offline file restore, the database is offline while files are restored. An offline restore sequence ends with the database being recovered and coming online.

In the Express, Workgroup, and Standard Editions of SQL Server, the database is offline for all file restores. In the Enterprise Edition, file restores are offline when you restore any file in the primary filegroup.

Online File Restore Scenario

If you are using the Enterprise Edition of SQL Server, while a database is online, you can restore and recover files in an offline secondary filegroup. This process is called an online file restore because the database is online. However, during the online restore of a file, the file is offline, along with its entire filegroup. After all the files in an offline filegroup are recovered, the file group is automatically brought online.

Note

Under the full recovery model or bulk-logged recovery model, the primary filegroup is always online.

Only online filegroups can be queried or updated. Attempts to access a filegroup that is offline (including a filegroup containing a file that is being restored or recovered) results in an error.

For more information, see Performing File Restores.

See Also

Concepts

Advantages of a File or Page Restore
File Backups
Page Restore Scenarios (Full Recovery Model)
Piecemeal Restore Scenario (Full Recovery Model)

Other Resources

Performing File Restores

Help and Information

Getting SQL Server 2005 Assistance