Export (0) Print
Expand All

Overview of Database Mirroring Setup

Updated: 14 April 2006

This section describes the general steps for setting up database mirroring. For an introduction to database mirroring, see Overview of Database Mirroring.

ms365599.note(en-US,SQL.90).gifImportant:
We recommend that you configure database mirroring during off-peak hours, because configuration can affect performance.

To set up database mirroring, follow these general steps:

  1. Make sure that logins exist on the mirror server for all of the database users. For more information, see Setting Up Login Accounts for Database Mirroring.
  2. Before making a database available on another server instance, on the other server instance, you must set up the environment needed to use the database on the new server instance. For more information, see Managing Metadata When Making a Database Available on Another Server Instance.
  3. Create the mirror database by restoring with NORECOVERY a recent full database backup of the principal database. Make sure that the principal database was already using the full recovery model when the backup was taken. The mirror database must have the same name as the principal database, and they cannot be renamed during a database mirroring session.
    ms365599.note(en-US,SQL.90).gifImportant:
    You must restore all of the log backups done since the full database backup. Before you can start mirroring on the partners, you should create a current log backup on the original database and restore it to the future mirror database.

    For more information, see How to: Prepare a Mirror Database for Mirroring (Transact-SQL). For information about creating and restoring log backups, see Working with Transaction Log Backups.
    ms365599.note(en-US,SQL.90).gifNote:
    Complete the remaining setup steps as soon as you can after taking the backup of the principal database.

  4. Set up security and start the database mirroring session.
    For more information, see one of the following:
    ms365599.note(en-US,SQL.90).gifNote:
    Database mirroring supports full-text catalogs. For more information, see Database Mirroring and Failover Clustering.

  5. Optionally, add a witness to the session.
    For more information, see one of the following:
    ms365599.note(en-US,SQL.90).gifNote:
    The database owner can turn off the witness for a database at any time. Turning off the witness is equivalent to having no witness, and automatic failover cannot occur.

For a comprehensive example of setting up database mirroring using Microsoft Windows Authentication, see Example: Setting Up Database Mirroring Using Windows Authentication (Transact-SQL).

For a comprehensive example of setting up database mirroring using certificate-based security, see Example: Setting Up Database Mirroring Using Certificates (Transact-SQL).

Release History

14 April 2006

New content:
  • Added a recommendation about creating and restoring a log backup before starting mirroring.
Changed content:

Community Additions

ADD
Show:
© 2014 Microsoft