You need to consider several factors to determine the best method for mirroring: the cost of system downtime, reduction or improvements in performance, and the cost of storage media. Three configurations (minimum, intermediate, and advanced) can be used to provide recovery with mirroring:
This configuration, shown in the following illustration, uses the minimum amount of disk space possible when mirroring and does not provide nonstop recovery because the master and/or user databases must be recovered.
For example, on partition D, store DEVICE1 (which contains the user database) and DEVICE2 (which contains the transaction log). On partition E, store the MASTER device and the mirror of the device that contains the user database's transaction log.
For example, on partition D store the MASTER device, DEVICE1 (which contains the user database) and DEVICE2 (which contains the transaction log). On partition E mirror the MASTER device, DEVICE1, and DEVICE2.
This configuration, shown in the following illustration, stores a mirror image of the transaction log and master database on one separate disk, and a mirror image of the user database on another separate disk. This option provides nonstop recovery with the highest level of redundancy.
For example, on partition D store the MASTER device and DEVICE2 (which contains the user transaction log). On partition E mirror the MASTER device and DEVICE2. On partition F store DEVICE1 (which contains the user database). On partition G mirror DEVICE1.
The following table summarizes each type of mirroring configuration.
Mirror type | Description/Benefit |
---|---|
No mirroring | Provides the greatest savings in disk space. However, transactions can be lost, since the database can be restored only to the latest transaction dump. |
Minimum configuration | Mirror only the device containing the transaction log. Guarantees up-to-the-minute recovery with no lost transactions. Does not allow nonstop recovery. To recover, it is necessary to reload transaction logs. This option uses the least storage space of any mirroring configuration. |
Intermediate configuration | Place devices containing transaction log, master database, and user database on one physical device, and a mirror copy of each on another physical device. Allows nonstop recovery. Consumes more disk space than a minimum configuration. Requires more time for write operations. |
Advanced configuration | Store a mirror image of the transaction log and master database on one separate disk, and a mirror image of the user database on another separate disk Allows nonstop recovery. Requires more disk devices than other configurations. Requires more time for write operations but generally improves read times over the intermediate configuration. (The transaction log is on a different device from the user database, so less disk head travel is required for read operations). Provides the greatest redundancy for maximum data integrity. |
If you want to mirror a database or log that spans more than one device, you must mirror all devices that contain the database.