Professional Documents
Culture Documents
InfraPCS
Something about IT Infrastructure and Life
This post is to outline the steps to configure the MSSQL database mirroring. The example topology is as below:
Step-1: On Principle SQL server S1, perform the backup of database “source01” with both full and trans-
action log backup. Copy the backup files to the Mirror SQL server.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy
https://ranchh.wordpress.com/2018/12/20/mssql-database-mirroring-configuration/ 1/6
11/1/21, 12:48 PM MSSQL Database Mirroring Configuration | InfraPCS
Step-2:
On Mirror SQL server S2, do NOT CREATE source01 database before restoration. Right click
“databases”and select “restore database”,perform the full and transaction log restoration of the database
“source01” with option “RESTORE WITH NORECOVERY”. It is noted that, after the restoration, the database
status should be “restoring…..”
Step-3: On Principle SQL server S1, right click the database “source01” and select “properties” and “mirror-
ing”. Then click “Configure Security”
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy
https://ranchh.wordpress.com/2018/12/20/mssql-database-mirroring-configuration/ 2/6
11/1/21, 12:48 PM MSSQL Database Mirroring Configuration | InfraPCS
Step-4: Follow the Configure Security wizard, choose “NO” in witness configuration. (If witness server is re-
quired, select “YES” and provides witness server details.)
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy
https://ranchh.wordpress.com/2018/12/20/mssql-database-mirroring-configuration/ 3/6
11/1/21, 12:48 PM MSSQL Database Mirroring Configuration | InfraPCS
Step-7: Provide the Domain service account to configure the database mirroring.
Step-8: After the security configuration is setup, select “Start Mirroring” to establish the database mirror-
ing. The database mirroring should be setup after this step.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy
https://ranchh.wordpress.com/2018/12/20/mssql-database-mirroring-configuration/ 4/6
11/1/21, 12:48 PM MSSQL Database Mirroring Configuration | InfraPCS
I have found that SQL Server Management Studio version 17 has a known issue to start the database mirroring
session. The error message is similar like below:
In this case, below command lines can be used to setup database mirroring:
Command Step-1: On Mirror SQL Server (S2 in our example), execute below SQL commands:
GO
Command Step-2: On Principle SQL Server (S1 in our example), execute below SQL commands:
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
SET PARTNER = 'TCP://S2.XXXXX.COM:5022'
https://ranchh.wordpress.com/2018/12/20/mssql-database-mirroring-configuration/ 5/6
11/1/21, 12:48 PM MSSQL Database Mirroring Configuration | InfraPCS
This entry was posted in Database and tagged Database, mirroring, MSSQL on December 20, 2018
[https://ranchh.wordpress.com/2018/12/20/mssql-database-mirroring-configuration/] .
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy
https://ranchh.wordpress.com/2018/12/20/mssql-database-mirroring-configuration/ 6/6