SlideShare a Scribd company logo
SQL Server Mirroring
The purpose of this document is to describe in detail the process of configuring Secret Server and SQL
Server 2008 for a high-availability environment using Mirroring. The contents of this paper include:
 Configuring SQL Server 2008 for database mirroring with a Failover Partner and a Witness
 The encryption used between the Primary Database and the Mirror Database
 Configuring Secret Server to use Mirroring to achieve high availability
Introduction
Three different SQL Server instances are required to implement this scenario: the Primary database, the
Mirror database, and the Witness. The Primary database is the main application database. The Mirror
database replicates all of the data on the Primary database in a transactional manner. The Witness
server is responsible for monitoring the health of the Primary and Mirror database and initiating failover
if necessary.
In the setup described here, Mirroring operates in synchronous mode, which means that a transaction
does not commit on the Primary database until it has committed on the Mirror. This article provides a
detailed overview of synchronous mirroring:
http://msdn.microsoft.com/en-us/library/ms179344.aspx
Setting up the databases for Mirroring
In order to initiate database mirroring, the databases on the Primary and Secondary must have the same
name, in our case ‘secretserver’. It is recommended that this step be performed before installation. To
initially set up mirroring, we must take a full backup of the database on Primary and then restore it onto
the database on Secondary. When restoring the database, the ‘RESTORE WITH NORECOVERY’ option
must be selected.
Sql server mirroring
The ‘Restoring…' message is expected.
SQL Server Configuration
The SQL Server instances should all be running under the same domain account. It is possible to run
under different accounts but the configuration is more complex and not supported by Thycotic technical
support.
Each SQL Server instance should be configured to listen on TCP.
Configuring Mirroring
To configure mirroring, right click on the database on Primary and select Properties and then Mirror.
Click on the ‘Configure Security’ button. A wizard will appear.
1. In our configuration we will need a witness server. Select the ‘Yes’ radio button
2. On step 2 select all of the Mirroring roles (Primary, Mirror, and Witness)
3. On this screen we need to select the current (Primary) server from the dropdown and enter a
port that the Primary SQL server will use to communicate with the other servers. Selecting the
‘Encrypt data sent through this endpoint’ checkbox will cause RC4 encryption to be used to
encrypt data sent through this endpoint. The endpoint name is there only so that one may
reference the endpoint later. The port selected here must be open for TCP communication on
the machine’s Firewall and on any network devices that restrict access to this machine.
4. Next, we enter similar information for the Mirror server instance, providing credentials to access
the Mirror server.
5. The same information is entered for the Witness Server, providing credentials to access the
Witness server.
6. Next, we are prompted for Service Accounts. The endpoints that were created in steps 3, 4, and
5 were created so that only the user whose credentials were used to connect to the machines
can access them. In order to grant permission on the endpoints here, enter the name of the
domain user that SQL Server runs under in all three text boxes.
7. We can select finish and then ‘Start Mirroring’
How Secret Server Supports Mirroring
On step 3 of the installer, the name of the Mirror server should be entered under the Advanced section.
Note that the credentials used to access the Primary database must also be valid on the Mirror database
for Failover to work.
Testing Mirroring
Open SQL Server Enterprise Manager and right click the Primary database and select ‘Properties’.
Viewing the ‘Mirroring’ tab and pressing the ‘Failover Now’ button will cause the database on Primary to
switch roles and become the Mirror database. The Mirror database will become the Primary. Clients
using the application should be able to continue as before. One request may fail before Secret Server
begins making requests to the new Primary database. This step is necessary to verify that Failover will
function correctly in the event that the Primary server is unavailable or inoperable.

More Related Content

DOCX
SOA Database Connectivity Issues Showing DatabaseException Internal Exception
PPTX
Chapter 8 part2
PDF
0065 using sequelink
PDF
ScrapeXpress-Standalone-solution
PDF
How to use prancer to detect and fix the azure sql resources which uses tls v...
PPTX
Linux VMWare image with Informatica , Oracle and Rundeck scheduler
PDF
Learn Drupal 8 Render Pipeline
PPTX
Android Database Tutorial
SOA Database Connectivity Issues Showing DatabaseException Internal Exception
Chapter 8 part2
0065 using sequelink
ScrapeXpress-Standalone-solution
How to use prancer to detect and fix the azure sql resources which uses tls v...
Linux VMWare image with Informatica , Oracle and Rundeck scheduler
Learn Drupal 8 Render Pipeline
Android Database Tutorial

What's hot (13)

PPTX
Session And Cookies In Servlets - Java
PPTX
Sql interview-question-part-6
PPTX
Ebook6
PPTX
Generate schema using wcf sql adapter 
PPTX
Kaashiv SQL Server Interview Questions Presentation
PDF
How to connect sql server to oracle server
DOCX
Odi 11g master and work repository creation steps
PPTX
Cejv659 week09 glassfish-s14
PPT
Mule security - jaas
PPT
Mule security - jaas
PDF
[Laptrinh.vn] lap trinh Spring Framework 3
DOCX
Microsoft SQL Azure - Developing And Deploying With SQL Azure Whitepaper
PPT
Session 1 introduction servlet - Giáo trình Bách Khoa Aptech
Session And Cookies In Servlets - Java
Sql interview-question-part-6
Ebook6
Generate schema using wcf sql adapter 
Kaashiv SQL Server Interview Questions Presentation
How to connect sql server to oracle server
Odi 11g master and work repository creation steps
Cejv659 week09 glassfish-s14
Mule security - jaas
Mule security - jaas
[Laptrinh.vn] lap trinh Spring Framework 3
Microsoft SQL Azure - Developing And Deploying With SQL Azure Whitepaper
Session 1 introduction servlet - Giáo trình Bách Khoa Aptech
Ad

Similar to Sql server mirroring (20)

PPTX
Database Mirror for the exceptional DBA – David Izahk
DOCX
Mirroring in SQL Server 2012 R2
PPTX
SQL Server 2012 Security Task
PPT
SQL Database Mirroring setup
PPTX
Sql server lesson2
DOCX
High availability solution database mirroring
PDF
SafePeak - How to configure SQL Server agent in a safepeak deployment
PDF
Detect and fix the azure sql resources which uses tls version less than 1.2
PPT
Database mirroring setup
PPT
Effective Usage of SQL Server 2005 Database Mirroring
PPTX
Microsoft SQL Server Database Administration.pptx
DOCX
Deploy sql express and share point foundation
PPTX
Final PPT after cla after class (1).pptx
PDF
Sql server distributed replay
PDF
Administrators manual
PDF
Administrators manual
PDF
installation and configuration of informatica server
PDF
SQL Server 2000 Installation Rollout Backout Plan
PDF
Ob loading data_oracle
PPT
session and cookies.ppt
Database Mirror for the exceptional DBA – David Izahk
Mirroring in SQL Server 2012 R2
SQL Server 2012 Security Task
SQL Database Mirroring setup
Sql server lesson2
High availability solution database mirroring
SafePeak - How to configure SQL Server agent in a safepeak deployment
Detect and fix the azure sql resources which uses tls version less than 1.2
Database mirroring setup
Effective Usage of SQL Server 2005 Database Mirroring
Microsoft SQL Server Database Administration.pptx
Deploy sql express and share point foundation
Final PPT after cla after class (1).pptx
Sql server distributed replay
Administrators manual
Administrators manual
installation and configuration of informatica server
SQL Server 2000 Installation Rollout Backout Plan
Ob loading data_oracle
session and cookies.ppt
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Cloud computing and distributed systems.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Spectroscopy.pptx food analysis technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PDF
Network Security Unit 5.pdf for BCA BBA.
DOCX
The AUB Centre for AI in Media Proposal.docx
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation theory and applications.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Spectral efficient network and resource selection model in 5G networks
Digital-Transformation-Roadmap-for-Companies.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Cloud computing and distributed systems.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectroscopy.pptx food analysis technology
MYSQL Presentation for SQL database connectivity
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
Network Security Unit 5.pdf for BCA BBA.
The AUB Centre for AI in Media Proposal.docx
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Weekly Chronicles - August'25 Week I
Understanding_Digital_Forensics_Presentation.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation theory and applications.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Spectral efficient network and resource selection model in 5G networks

Sql server mirroring

  • 1. SQL Server Mirroring The purpose of this document is to describe in detail the process of configuring Secret Server and SQL Server 2008 for a high-availability environment using Mirroring. The contents of this paper include:  Configuring SQL Server 2008 for database mirroring with a Failover Partner and a Witness  The encryption used between the Primary Database and the Mirror Database  Configuring Secret Server to use Mirroring to achieve high availability Introduction Three different SQL Server instances are required to implement this scenario: the Primary database, the Mirror database, and the Witness. The Primary database is the main application database. The Mirror database replicates all of the data on the Primary database in a transactional manner. The Witness server is responsible for monitoring the health of the Primary and Mirror database and initiating failover if necessary. In the setup described here, Mirroring operates in synchronous mode, which means that a transaction does not commit on the Primary database until it has committed on the Mirror. This article provides a detailed overview of synchronous mirroring: http://msdn.microsoft.com/en-us/library/ms179344.aspx Setting up the databases for Mirroring In order to initiate database mirroring, the databases on the Primary and Secondary must have the same name, in our case ‘secretserver’. It is recommended that this step be performed before installation. To initially set up mirroring, we must take a full backup of the database on Primary and then restore it onto the database on Secondary. When restoring the database, the ‘RESTORE WITH NORECOVERY’ option must be selected.
  • 3. The ‘Restoring…' message is expected. SQL Server Configuration The SQL Server instances should all be running under the same domain account. It is possible to run under different accounts but the configuration is more complex and not supported by Thycotic technical support. Each SQL Server instance should be configured to listen on TCP.
  • 4. Configuring Mirroring To configure mirroring, right click on the database on Primary and select Properties and then Mirror. Click on the ‘Configure Security’ button. A wizard will appear. 1. In our configuration we will need a witness server. Select the ‘Yes’ radio button 2. On step 2 select all of the Mirroring roles (Primary, Mirror, and Witness) 3. On this screen we need to select the current (Primary) server from the dropdown and enter a port that the Primary SQL server will use to communicate with the other servers. Selecting the ‘Encrypt data sent through this endpoint’ checkbox will cause RC4 encryption to be used to encrypt data sent through this endpoint. The endpoint name is there only so that one may reference the endpoint later. The port selected here must be open for TCP communication on the machine’s Firewall and on any network devices that restrict access to this machine.
  • 5. 4. Next, we enter similar information for the Mirror server instance, providing credentials to access the Mirror server.
  • 6. 5. The same information is entered for the Witness Server, providing credentials to access the Witness server. 6. Next, we are prompted for Service Accounts. The endpoints that were created in steps 3, 4, and 5 were created so that only the user whose credentials were used to connect to the machines can access them. In order to grant permission on the endpoints here, enter the name of the
  • 7. domain user that SQL Server runs under in all three text boxes. 7. We can select finish and then ‘Start Mirroring’ How Secret Server Supports Mirroring On step 3 of the installer, the name of the Mirror server should be entered under the Advanced section. Note that the credentials used to access the Primary database must also be valid on the Mirror database for Failover to work.
  • 8. Testing Mirroring Open SQL Server Enterprise Manager and right click the Primary database and select ‘Properties’. Viewing the ‘Mirroring’ tab and pressing the ‘Failover Now’ button will cause the database on Primary to switch roles and become the Mirror database. The Mirror database will become the Primary. Clients using the application should be able to continue as before. One request may fail before Secret Server begins making requests to the new Primary database. This step is necessary to verify that Failover will function correctly in the event that the Primary server is unavailable or inoperable.