Categories
Sql Server

SQL Server Database Mirroring in Domain Environment

SQL Server Database Mirroring in Domain Environment

Hi friends, in this post we will discuss how to configure SQL Server Database Mirroring in Domain Environment. Earlier we have discussed How To Set Up Database Mirroring In Windows Workgroup.

Here are some conditions to be meet to configure Database mirroing:

  • For a mirroring session to be established, the partners and the witness, if any, must be running on the same version of SQL Server.
  • The two partners, that is the principal server and mirror server, must be running the same edition of SQL Server. The witness, if any, can run on any edition of SQL Server that supports database mirroring.
  • The database must use the full recovery model. The simple and bulk-logged recovery models do not support database mirroring. Therefore, bulk operations are always fully logged for a mirrored database. For information about recovery model.
  • Verify that the mirror server has sufficient disk space for the mirror database.
  • When you are creating 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 that were created after that backup was taken must also be applied, again WITH NORECOVERY.

Now we have to set up login accounts for database mirroring: Here we are using One domain account to run all SQL Server instances services through one domain account. For more information check here: https://msdn.microsoft.com/en-IN/library/ms366346(v=sql.105).aspx

Once we done with all above mentioned prerequisites, start configuring SQL Server Database Miroring.

1. Take a full database backup of database for which you want to configure mirroring, and restore it on mirror server with no recovery.

2. Now Login into principal SQL Server instance. Right click on Database, for which you want to configure database mirroring. Go to Tasks > Click on Mirror.

SQL Server Database Mirroring in Domain Environment

3. A Window will open, Now click on Configure Security, a new pop up will open, now choose YES/NO accordingly if you want Witness server or not. Here we are using Witness server.

SQL Server Database Mirroring in Domain Environment

SQL Server Database Mirroring in Domain Environment

4. Now Click Next, on next window select checkbox. Witness server Instance.

SQL Server Database Mirroring in Domain Environment

5. Click Next, On next screen. Your Prinicipal server is choosed itself, default port of mirroring is 5022.

SQL Server Database Mirroring

6. Click next, and connect to Mirror server.

SQL Server Database Mirroring

7. Click next and connect to Witness server.

Database Mirroring

8. Click next, and mentioned domain account under which SQL Server Services are running. Then click next.

Mirroring

9. Now click close, and click on start mirroring.

SQL Server Database Mirroring in Domain

SQL Server Database Mirroring in Domain Environment


SQL Server Database Mirroring