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.
- The first step is to create an endpoint and a listener port on the Principal Server.
- 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:
- 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 ...