Example: Online Restore of a Read-Only File (Full Recovery Model)

Icon showing a blue database disk This topic is relevant for SQL Server databases under the full recovery model that contain multiple files or filegroups.

In this example, a database named adb, which uses the full recovery model, contains three filegroups. Filegroup A is read/write, and filegroup B and filegroup C are read-only. Initially, all of the filegroups are online.

A read-only file, b1, in filegroup B of database adb has to be restored. A backup was taken since the file became read-only; therefore, log backups are not required. Filegroup B is offline for the duration of the restore, but the remainder of the database remains online.

Restore Sequence

To restore the file, the database administrator uses the following restore sequence:

RESTORE DATABASE adb FILE='b1' FROM filegroup_B_backup
WITH RECOVERY 

Filegroup B is now online.

See Also

Concepts

Performing Online Restores
Overview of Restore and Recovery in SQL Server
Performing File Restores (Full Recovery Model)

Other Resources

Examples of Restore Sequences for Several Restore Scenarios
RESTORE (Transact-SQL)

Help and Information

Getting SQL Server 2005 Assistance