鏡像備份媒體集 (SQL Server)Mirrored Backup Media Sets (SQL Server)

適用於: 是SQL Server 否Azure SQL Database 否Azure SQL 資料倉儲 否平行處理資料倉儲 APPLIES TO: yesSQL Server noAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

注意

只有 SQL ServerSQL ServerEnterprise Edition 才支援鏡像備份媒體集。Mirrored backup media sets are supported only in the Enterprise edition of SQL ServerSQL Server.

鏡像媒體集可降低備份裝置功能不正常的影響,進而提高備份可靠性。Mirroring a media set increases backup reliability by reducing the impact of backup-device malfunctions. 這些功能不正常特別嚴重,因為備份是避免資料遺失的最後一道防線。These malfunctions are very serious because backups are the last line of defense against data loss. 隨著資料庫增長,備份裝置或媒體失敗導致備份無法還原的機會也越大。As databases grow, the probability increases that a failure of a backup device or media will make a backup nonrestorable. 鏡像備份媒體提供的備援性可以提升備份的可靠性。Mirroring backup media increases the reliability of backups by providing redundancy.

注意

如需媒體集的一般資訊,請參閱 媒體集、媒體家族與備份組 (SQL Server)Enterprise Edition 才支援鏡像備份媒體集。For information about media sets in general, see Media Sets, Media Families, and Backup Sets (SQL Server).

本主題內容:In this Topic:

鏡像媒體集概觀Overview of Mirrored Media Sets

媒體鏡像是媒體集的一種屬性。Media mirroring is a property of the media set. 「鏡像媒體集」 是由多份媒體集複本 (「鏡像」 ) 組成。A mirrored media set consists of multiple copies (mirrors) of the media set. 媒體集包含一個或多個媒體家族,其中每一個都對應到備份裝置。A media set contains one or more media families, each of which corresponds to a backup device. 例如,如果 BACKUP DATABASE 陳述式的 TO 子句列出三個裝置,BACKUP 會將資料分散在三個媒體家族中,每個裝置一份資料。For example, if the TO clause of a BACKUP DATABASE statement lists three devices, BACKUP spreads the data among three media families, one per device. 建立媒體集 (由 BACKUP DATABASE 陳述式指定 WITH FORMAT) 時,就會定義媒體家族和鏡像的數目。The number of media families and mirrors is defined when the media set is created (by a BACKUP DATABASE statement that specifies WITH FORMAT).

鏡像媒體集包含二到四個鏡像。A mirrored media set possesses from two to four mirrors. 每個鏡像都包含媒體集中的所有媒體家族。Each mirror contains all the media families in the media set. 鏡像需要相同數目的裝置,每個媒體家族有一個裝置。The mirrors require the same number of devices, one per media family. 每個鏡像需要每個媒體家族有不同的備份裝置。Each mirror requires a separate backup device for each media family. 例如,由四個媒體家族而有三個鏡像組成的鏡像媒體集需要十二個備份裝置。For example, a mirrored media set that consists of four media families with three mirrors requires twelve backup devices. 所有裝置都必須相同。All of these devices must be equivalent. 例如,相同製造商所提供的相同型號磁帶機。For example, tape drives that have the same model number from the same manufacturer.

下圖提供以兩個鏡像的兩個媒體家族組成的鏡像媒體集範例。The following illustration shows an example of a mirrored media set that consists of two media families with two mirrors. 每個媒體家族都包含三個媒體磁碟區,磁碟區是每個鏡像備份一次。Each media family contains three media volumes, which are backed up one time per mirror.

鏡像媒體集:兩個具有兩個鏡像的家族Mirrored media set: two families with two mirrors

鏡像上對應磁碟區有相同的內容。Corresponding volumes on the mirrors have identical contents. 如此可在還原時互換。This makes them interchangeable at restore time. 例如在之前圖表中,tape2 的第三個磁碟區可與 tape0 的第三個磁碟區互換。For example, in the previous illustration, the third volume of tape2 is interchangeable with the third volume of tape0.

SQL Server Database EngineSQL Server Database Engine 會同步寫入每個裝置,以保證鏡像媒體具有完全相同的內容。The SQL Server Database EngineSQL Server Database Engine guarantees that the mirrored media have identical contents by synchronizing writes to the devices. 其中任何一個鏡像填滿時,會同時跨裝置填滿所有鏡像。When any one of the mirrors fills, all the mirrors are spanned at one time.

重要

您無法藉由移除鏡像的方式,將鏡像媒體集以隱含方式打散 (分割)。A mirrored media set cannot be implicitly broken (split) by removing a mirror. 若鏡像中的任何磁帶或磁碟損壞或重新格式化,則該鏡像就不能再用於其他備份作業。If any tape or disk in a mirror is damaged or reformatted, the mirror is no longer usable for additional backups. 若最後還有一個完整鏡像作用中,則可以讀取該媒體集。If at least one full mirror remains intact, the media set can be read. 若每個鏡像都遺失特定媒體家族,則該媒體集沒有用處。If every mirror loses a given media family, the media set is useless.

備份和還原作業的需求視所有鏡像是否必須存在而異。Backup and restore operations impose different requirements on whether all the mirrors must be present. 若要讓備份作業寫入 (亦即,建立或擴充) 鏡像媒體集,所有的鏡像都必須存在。For a backup operation to write (that is, to create or extend) a mirrored media set, all the mirrors must be present. 相對地,當從鏡像媒體集中還原備份時,每個媒體家族只能指定單一鏡像。In contrast, when you are restoring a backup from a mirrored media set, you can specify only a single mirror for each media family. 您可以從比家族少的裝置進行還原,但每個媒體家族只處理一次。You can restore from fewer devices than families, but each media family is processed only one time. 不過,如果有其他鏡像,當出現錯誤時,解決部分還原問題的速度會比較快。In the presence of errors, however, having the other mirrors enables some restore problems to be resolved quickly. 您可以利用另一個鏡像的對應磁碟區來替代損毀的媒體磁碟區。You can substitute a damaged media volume with the corresponding volume from another mirror. 這是因為 RESTORE 與 RESTORE VERIFYONLY 支援使用另一個鏡像的對應備份媒體磁碟區來替換損壞的媒體。This is because RESTORE and RESTORE VERIFYONLY support substitution of damaged media with the corresponding backup-media volume from another mirror.

備份鏡像的硬體需求Hardware Requirements for Backup Mirrors

鏡像適用於磁碟與磁帶 (磁碟不支援接續磁帶)。Mirroring applies both to disk and tape (disks do not support continuation tapes). 單一備份或還原作業的所有備份裝置都必須是相同類型 - 磁碟或磁帶。All backup devices for a single backup or restore operation must be of the same type, disk or tape.

在這些廣泛的類別中,您必須使用具有相同屬性的類似裝置。Within these broader classes, you must use similar devices that have the same properties. 裝置不夠類似會產生錯誤訊息 (3212)。Insufficiently similar devices generate an error message (3212). 為了避免裝置不符的風險,請使用相同的裝置,例如,只使用相同製造商製造的同型號磁碟機。To avoid the risk of a device mismatch, use devices that are equivalent, such as, only drives with the same model number from the same manufacturer.

相關工作Related Tasks

若要備份至鏡像備份裝置To back up to mirrored backup devices

另請參閱See Also

備份和還原期間可能發生的媒體錯誤 (SQL Server) Possible Media Errors During Backup and Restore (SQL Server)
RESTORE VERIFYONLY (Transact-SQL) RESTORE VERIFYONLY (Transact-SQL)
備份裝置 (SQL Server) Backup Devices (SQL Server)
媒體集、媒體家族與備份組 (SQL Server)Media Sets, Media Families, and Backup Sets (SQL Server)