Export (0) Print
Expand All

Back Up to a Mirrored Media Set (Transact-SQL)

This topic describes how to use the Transact-SQL BACKUP statement to specify a mirrored media set when backing up a SQL Server database. In your BACKUP statement, specify the first mirror in the TO clause. Then, specify each mirror in its own MIRROR TO clause. The TO and MIRROR TO clauses must specify the same number and type of backup devices.

The following example creates the mirrored media set illustrated in the previous illustration and backs up the AdventureWorks2012 database to both mirrors.

BACKUP DATABASE AdventureWorks2012
TO TAPE = '\\.\tape0', TAPE = '\\.\tape1'
MIRROR TO TAPE = '\\.\tape2', TAPE = '\\.\tape3'
    MEDIANAME = 'AdventureWorks2012Set1';

To restore from a mirrored backup

Community Additions

© 2015 Microsoft