title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | |||
---|---|---|---|---|---|---|---|---|---|---|---|
Online restore: read-only file (full recovery model) |
This example shows an online restore in SQL Server of a read-only file for a database using the full recovery model with multiple filegroups. |
MashaMSFT |
mathoma |
03/14/2017 |
sql |
backup-restore |
conceptual |
|
[!INCLUDE SQL Server]
This topic is relevant for [!INCLUDEssNoVersion] 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.
Note
The syntax for an online restore sequence is the same as for an offline 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.
-
Example: Piecemeal Restore of Database (Simple Recovery Model)
-
Example: Piecemeal Restore of Only Some Filegroups (Simple Recovery Model)
-
Example: Online Restore of a Read-Only File (Simple Recovery Model)
-
Example: Piecemeal Restore of Database (Full Recovery Model)
-
Example: Piecemeal Restore of Only Some Filegroups (Full Recovery Model)
-
Example: Online Restore of a Read-Write File (Full Recovery Model)
Online Restore (SQL Server)
Restore and Recovery Overview (SQL Server)
File Restores (Full Recovery Model)
RESTORE (Transact-SQL)