O'Reilly logo

Microsoft SQL Server 2008 High Availability by Hemantgiri S. Goswami

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuration using T-SQL

We have seen how to install Database Mirroring using the wizard. It's now time to see Database Mirroring installation using T-SQL code.

  1. The first step is to create an endpoint and a listener port on the Principal Server.
    Configuration using T-SQL
  2. The next step is to create the endpoint and listener port on the Mirror instance. To do so, execute the following code on the Mirror server:
    Configuration using T-SQL
  3. We will now create a partner for the database that we want to be part of the Database Mirroring setup. Execute the code shown in the next screenshot into the Mirror server ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required