Delen via


Database Mirroring and Backup and Restore

Icon showing a blue database disk This topic is relevant only for full-model databases that have multiple filegroups.

Database mirroring is a primarily software solution for increasing database availability. Mirroring is implemented on a per-database basis and works only with databases that use the full recovery model. For more information, see Overview of Database Mirroring.

Note

To distribute copies of a subset of the filegroups in a database, use replication: replicate only those objects in the filegroups you want to copy to other servers. For more information about replication, see SQL Server Replication.

Creating the Mirror Database

The mirror database is created by restoring, without recovering, backups of the principal database on the mirror server. The restore must keep the same database name. For more information, see Preparing a Mirror Database for Mirroring.

You can create the mirror database by using use a piecemeal restore sequence, where supported. However, you cannot start mirroring until you have restored all the filegroups and, typically, restored log backups to get the mirror database close enough in time with the principal database. For more information, see Performing Piecemeal Restores.

Restrictions on Backup and Restore During Mirroring

While a database mirroring session is active, the following restrictions apply:

  • Backup and restore of the mirror database are not allowed.
  • Backup of the principal database is allowed, but BACKUP LOG WITH NORECOVERY is not allowed.
  • Restoring the principal database is not allowed.

See Also

Concepts

Securing Data and Log Files

Help and Information

Getting SQL Server 2005 Assistance