
Mirror Database Preparation
Whether starting mirroring for the first time or starting it again after mirroring was removed, verify that the mirror database is prepared for mirroring.
When you create the mirror database on the mirror server, make sure that you restore the backup of the principal database specifying the same database name WITH NORECOVERY. Also, all log backups created after that backup was taken must also be applied, again WITH NORECOVERY.
Also, we recommend that, if it is possible, the path (including the drive letter) of the mirror database be identical to the path of the principal database. If the file layouts must differ, for example, if the principal database is on drive 'F:' but the mirror system lacks an F: drive, you must include the MOVE option in the RESTORE statement.
Important: |
|---|
|
If you move the database files when you are creating the mirror database, you might be unable to add files to the database later without mirroring being suspended.
|
If database mirroring has been stopped, all subsequent log backups taken on the principal database must be applied to the mirror database before mirroring can be restarted.
For more information, see How to: Prepare a Mirror Database for Mirroring (Transact-SQL).