Post on 10-Feb-2017
transcript
INSTALLING SQL
SERVER 2012 Failover Cluster Instance
ABSTRACT This document leads the reader through the
process of installing SQL Server 2012 Failover
Cluster Instance on a 2-server active-passive
environment ready to support your production
activities.
David Muise SQL Server 2012
CONTENTS
Introduction ..................................................................................................................................... 1
Concept ....................................................................................................................................... 1
Scope ........................................................................................................................................... 1
Purpose ........................................................................................................................................ 1
Prerequisites ................................................................................................................................ 1
Practices .......................................................................................................................................... 2
Best Practices .............................................................................................................................. 2
System Impact ............................................................................................................................. 3
Failover Requirements ................................................................................................................ 3
Preparations to Install ..................................................................................................................... 4
Failover Cluster Installation ............................................................................................................ 5
SQL Server 2012 Installation...................................................................................................... 5
Setup Support Rules .................................................................................................................... 5
Product Key ................................................................................................................................ 6
License Terms ............................................................................................................................. 6
Setup Support Rules .................................................................................................................... 6
Setup Role ................................................................................................................................... 6
Feature Selection ......................................................................................................................... 6
Instance Features ..................................................................................................................... 6
Shared Features ....................................................................................................................... 6
Feature Rules .............................................................................................................................. 7
Instance Configuration ................................................................................................................ 7
Disk Space Requirements ........................................................................................................... 7
Cluster Resource Group .............................................................................................................. 7
Cluster Disk Selection................................................................................................................. 7
Cluster Network Configuration................................................................................................... 8
Server Configuration ................................................................................................................... 9
Service Accounts .................................................................................................................... 9
Collation .................................................................................................................................. 9
Database Engine Configuration .................................................................................................. 9
Server Configuration ............................................................................................................... 9
Data Directories .................................................................................................................... 10
FILESTREAM ...................................................................................................................... 10
Error Reporting ......................................................................................................................... 10
Cluster Installation Rules .......................................................................................................... 10
Ready to Install ......................................................................................................................... 11
Installation Progress .................................................................................................................. 11
Complete ................................................................................................................................... 11
Close ..................................................................................................................................... 11
Add a Failover Node ..................................................................................................................... 12
Add a Node Installation ............................................................................................................ 12
Setup Support Rules .................................................................................................................. 14
Product Key .............................................................................................................................. 14
License Terms ........................................................................................................................... 14
Setup Support Rules .................................................................................................................. 14
Cluster Node Configuration ...................................................................................................... 14
Cluster Network Configuration................................................................................................. 15
Service Accounts ...................................................................................................................... 15
Error Reporting ......................................................................................................................... 16
Add Node Rules ........................................................................................................................ 16
Ready to Add Node ................................................................................................................... 16
Add Node Progress ................................................................................................................... 16
Complete ................................................................................................................................... 16
Close ..................................................................................................................................... 17
Failover Tests ................................................................................................................................ 17
Testing your new failover cluster ............................................................................................. 17
Results ................................................................................................................................... 17
Removing a Node ......................................................................................................................... 18
Adding a Generic Failover-unaware Resource ............................................................................. 18
SQL Server Updates ..................................................................................................................... 18
Steps for updating your clustered servers ................................................................................. 19
Failover Cluster Diagram .............................................................................................................. 20
Reference ...................................................................................................................................... 21
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 1
INTRODUCTION
This document serves as a guide when the decision is to deploy a SQL Server 2012 Failover
Cluster Instance environment. A failover cluster instance serves as a means of providing your
customers with near 100% availability of services. When your active server goes off-line - for
whatever reason – You achieve High Availability by failing over to your passive server, which
then provides the services. Minimal downtime is the result of such an environment.
CONCEPT The impetus for this document is to guide the user through the process of properly installing a 2-
node Active-Passive SQL Server Failover Instance (FCI). The two servers reside on the same
network node.
SCOPE The intent of this document is to help the reader through the process of installing SQL Server
2012 as a failover cluster instance.
PURPOSE This document will highlight several issues the reader should be aware of while installing SQL
Server 2012. The goal is to avoid many of the pitfalls associated with FCI installations leading
to a first-time installation success.
PREREQUISITES Installing SQL Server in a failover cluster configuration is not very difficult. However, there
are preliminary steps to satisfy prior to starting the installation process. The following
outlines those requirements:
1. The server must have access to and be a member of Active Directory (AD).
2. Your chosen Windows operating system has to support failover clustering.
3. You must verify that Microsoft .NET framework 3.5 SP1 is installed.
4. SQL Server requires a virtual account name that resides in Active Directory. This virtual
account will become the ‘SQL Server Network Name’ (SSNN) during the installation
process. The SSNN must have full control rights over the cluster server in order that
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 2
proper permissions are established. This is a step normally completed by your network
administrator prior to installing SQL Server.
5. The SQL Server installation requires the SSNN IP address.
6. Microsoft Data Transaction Coordinator (MSDTC) is required if you are installing more
than just the DB engine. The MSDTC normally resides on its own server
7. A Cluster Shared Volume (CSV) is one resource used in a failover environment. The
disk drives hold the files associated with the failover database, SQL Server instance and
quorum data.
PRACTICES
While installing SQL Server is the ultimate goal, there are a number of preliminary steps to take
first. Technology focuses on configuration Best Practices to ensure a reliable and secure server.
Short-cuts and sidestepping some aspects of the install procedure can lead to difficulties in the
end.
BEST PRACTICES The industry has defined a number of Best Practices for SQL Server and the installation process.
Below are a few notables.
1. The files associated with your SQL Server instance should reside on separate drives.
Your SQL Server binaries are on a separate drive from your database(s) that are separate
from your log file(s). The failure of one drive should not cost you the added time of
reinstalling all other aspects of your environment.
2. Best Practice says to use individual accounts for the SQL Server Agent and Database
Engine. This practice provides an extra layer of security from server to server.
3. You should use separate passwords for each service account (sa) because if someone
mistypes the password on a new install, it could conceivably lock the account causing
widespread issues. Remember the account is in Active Directory.
4. After using any required password, secure them for future reference.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 3
SYSTEM IMPACT You most likely answered the question, “what is the expected availability of this system”.
Otherwise, your choice for employing failover clustering would not be part of your schema.
Installing SQL Server in a failover cluster allows you to address the needs of the customer.
Firstly, by using failover technology you address the Recovery Time Objective (RTO) because
SQL Server should transfer ownership of the resources to the passive server. Thus, your
downtime is dependent on how fast that server brings its services online.
Next, you address the Recovery Point Objective (RPO) directly because the failover cluster
configuration depends on the use of Clustered Shared Volumes (CSV). Your database and
supporting files reside on the shared volumes allowing the passive server to access it without any
reconfiguration required.
FAILOVER REQUIREMENTS 1. All databases must be set for Full Recovery model
2. The Active server (Node A) is the owner of all resources prior to installing SQL Server.
3. The passive server (Node B) is up and running.
4. The failover cluster instance uses a static IP. The virtual cluster IP cannot change.
Therefore, you cannot select DHCP as part of your configuration.
Note: Node A is your active server for purposes of this installation instruction. Node B is the
passive server that also receives an installation of SQL Server after the initial install. Node A
owns the cluster resources at the time of installation.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 4
PREPARATIONS TO INSTALL
Gathering up the information ahead of time provides the opportunity to track down any missing
data before beginning.
1. Your installation program must be available to each server.
2. Node A must have ownership of all cluster resources prior to installing SQL Server.
3. List out your directories to use for your database(s) and log file(s).
4. Determine the directory for your backup files. That location could be a separate drive or
different server.
5. You should create a SQL Server Instance name instead of accepting the default. For
example, Server_name\instance_name.
6. Have your SQL Server Agent and SQL Server Database Engine domain account names
ready.
7. The SQL Server service account (sa) requires a password.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 5
FAILOVER CLUSTER INSTALLATION
Once you have everything organized, it is time to begin. Install SQL Server 2012 on Node A.
SQL SERVER 2012 INSTALLATION o Start the install process by executing the SQL Server setup program on Node A.
o Select Installation from the left-hand panel. (Refer to Figure 1)
o Select New SQL Server failover cluster installation in the main panel.
SETUP SUPPORT RULES o The install program runs a Setup Support Rules routine and provides a summary.
You may need to stop the install process and fix any errors.
Figure 1 – SQL Server Installation
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 6
PRODUCT KEY o Enter your product key.
o Click the Next > button.
LICENSE TERMS o Read and accept the License Terms.
SETUP SUPPORT RULES o The install program runs a Setup Support Rules routine and displays the results.
You may need to stop the install process and fix any errors.
SETUP ROLE o Choose SQL Server Feature Installation.
o Click the Next > button.
FEATURE SELECTION
Instance Features
o Select Database Engine Services for the Instance Features that automatically selects the
three underlying features.
Shared Features
o Select Client Tools Connectivity and Management Tools.
Note: IF you need to install any other service such as Analysis or Reporting Services, do that
separately. Those services are not cluster-aware.
Note: Refer to the Reference page for a link to a web page describing how to install Reporting
Services on an existing SQL Server clustered instance.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 7
FEATURE RULES o The install program runs a Feature Rules routine and displays the results.
You may need to stop the install process and fix any errors.
INSTANCE CONFIGURATION o The top textbox on the page receives the SQL Server
Network Name (SSNN). This is the name previously
created in Active Directory (AD). (See Figure 2 next page)
o Select the radio button next to Named Instance and
type the instance name into the textbox.
o The Instance root directory textbox receives the
initial path for your SQL Server instance (where the
binaries will reside).
o Click the Next > button.
Note: When you open up SQL Server Management Studio
(SSMS), the connection string for this instance will look
like ssnn\sqlinstance.
DISK SPACE REQUIREMENTS o This page provides you the opportunity to review the
disk usage for this particular instance install.
CLUSTER RESOURCE GROUP o This page displays the available storage devices. The
resources you require appear on the next page. This page is
primarily for review.
CLUSTER DISK SELECTION o Assign your disk drive resources to the cluster on
this page. This provides the storage SQL Server uses, as
you shall define in a couple more steps. (Refer to Figure 3
next page)
Best Practices are methods and
processes used by many companies
today. Best Practices have matured
because many people have contributed
to their development. This in turn
eliminates many wasteful and costly
steps.
Best Practices help you reduce risk by
avoiding common mistakes. You can
search blogs, download white papers
and attend user group that help you learn
of better means to accomplish certain
tasks. By following the examples and
cautions noted by past authors, you
benefit from their experience.
Best Practices are learned experiences
through labs, fieldwork and academic
studies. These practices are not the
ultimate decision-maker for how you
proceed, but they provide a groundwork
to guide you to a final product.
The goal of Best Practices is to gain
operational excellence. If you continue
to document and learn from previous
issues, your process improves to the
point that the organization now relies on
proven Best Practices to develop product
at a highly proficient level.
Best Practices
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 8
CLUSTER NETWORK CONFIGURATION o Select the IPv4 checkbox.
o Do NOT select DHCP.
o Type in the IP Address in the address textbox.
Note: The IP Address must be a static IP. You cannot use DHCP with a failover cluster
configuration.
Figure 2 – Instance Configuration
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 9
Figure 3 – Cluster Disk Selection
SERVER CONFIGURATION
Service Accounts
o This is the page you enter your account name(s) for the SQL Server Agent and SQL
Server Database Engine.
o Click the Next > button.
Tip: Best Practices recommend using separate names for each account. The subsequent failover
server install asks for the same names used on this page.
Collation
o You should review your collation choice and select the appropriate choice on the
Collation Tab.
DATABASE ENGINE CONFIGURATION
Server Configuration
o On this page you make you chose the desired Authentication Mode.
o Enter a password for the SQL Server system administrator.
Tip: You enter other users or groups into the box below the password.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 10
Data Directories
o This is the form where you organize all the folders SQL Server will work with. Refer to
Figure 4 below.
FILESTREAM
o Normally failover clusters do not use FILESTREAM. However, this is the page for that
purpose.
Figure 4 – Database Directories
ERROR REPORTING o The SQL Server install program next presents the Error Reporting page.
You may need to stop the install process and fix any errors.
CLUSTER INSTALLATION RULES o The install program next presents a Cluster Installation Rules page for your review.
You may need to stop the install process and fix any errors.
o Click the Next > button when ready.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 11
READY TO INSTALL o The Ready to Install page allows the user to review all the information one last time prior
to starting the install process.
o Click the Install button when you are ready.
INSTALLATION PROGRESS o Follow the installation progress.
COMPLETE The Complete page should present all green checkmarks (just like in Figure 5) with a status of
Succeeded if all went well.
Figure 5 - Complete
Close
If you received favorable results, you now must proceed to the next phase detailed below
titled, Add a Failover Node.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 12
Hint:
If you received error message(s), you will have to troubleshoot each flagged item. You may
have to verify Active Directory names with your network group or ensure your credentials allow
you to install software.
ADD A FAILOVER NODE
You must now run the installation program on Node B. This process installs the binaries so the
services can run when the failover falls to the passive server. Remember passive means that the
server does not own any of the cluster resources.
ADD A NODE INSTALLATION o Start the install process by executing the SQL Server setup program on the server.
o Select Installation from the left-hand panel.
o Select Add node to a SQL Server failover cluster in the main panel.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 13
Figure 6 - Add a node
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 14
SETUP SUPPORT RULES o The install program runs a Setup Support
Rules routine and presents the results.
You may need to stop the install process and
fix any errors.
PRODUCT KEY o Enter your product key.
o Click the Next > button.
LICENSE TERMS o Read and accept the License Terms.
SETUP SUPPORT RULES o The install program runs a Setup Support
Rules routine and presents the results.
You may need to stop the install process and
fix any errors.
CLUSTER NODE CONFIGURATION o The SQL Server instance name previously
chosen should appear in the drop-down box.
o The next textbox displays the name of this
node (passive server).
Refer to Figure 7 below.
o Once the data is verified, click the Next >
button.
Advantages
Use a single license for
multiple servers.
Install a 2-node (active /
passive) cluster using
standard edition.
Client software connects to
virtual IP Address.
Instance fails over; not
database.
Clustered shared storage
saves money.
Minimize RPO & RTO
issues.
Disadvantages
Disk storage is single-point
of failure.
Without a quorum, there is
no cluster.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 15
CLUSTER NETWORK CONFIGURATION o Select the IPv4 checkbox.
o Do NOT select DHCP.
o Enter the IP Address of this server in the Address textbox.
SERVICE ACCOUNTS
o You must enter the same password(s) for the same accounts as in the initial installation.
Figure 7 - Cluster Node Configuration
Figure 8 - Cluster Network Configuration
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 16
ERROR REPORTING o Review the information on this page.
o Then click the Next > button.
ADD NODE RULES o The install program runs Add Node Rules routine and displays the results.
You may need to stop the install process and fix any errors.
READY TO ADD NODE o The Ready to Add Node page allows the user to review all the information one last time
prior to starting the install process.
o Click the Install button when you are ready.
ADD NODE PROGRESS o Follow the installation progress.
COMPLETE o The Complete page should present all green checkmarks (just like in Figure 9) with a
status of Succeeded if all went well.
Figure 9 - Complete
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 17
Close
If you received favorable results, congratulations!
Press the Close button.
Proceed to test your environment.
FAILOVER TESTS
The installation process presented in this document is predicated on the scenario that you are
installing an Active – Passive failover cluster instance using two servers. In that role, Node B
does not interact with the outside network. Node B is responsible only to answer the network
calls indicating it is alive (on a heartbeat node normally) and thus still a member of the quorum.
When Node A fails in any manner, Node B services turn on. Node B then takes responsibility
for the cluster instance and gains ownership of the cluster resources (disk drives and virtual
network name).
TESTING YOUR NEW FAILOVER CLUSTER Reboot the primary node
Terminate the SQL Server exe process on the active node
Disconnect all network cables from the primary server.
o Refer to the Reference section for a hyperlink for testing.
Results
The Failover Cluster Manager displays the server that now owns the disk drives.
Any client software should still connect because they reference the virtual network name.
The now active server owns the DTC and quorum computers.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 18
REMOVING A NODE
If there is a need to remove a node from the cluster, refer to the Reference section for a
hyperlink.
ADDING A GENERIC FAILOVER-UNAWARE RESOURCE
Software development today usually takes advantage of new technology as it becomes available.
SQL Server is failover-aware and thus takes advantage of that technology. Other vendor
software developers can also make their software failover cluster aware. However, there are
vendors who do not take advantage of the technology.
For that type of software, Microsoft developed a procedure allowing your failover-unaware
software to operate within this environment. For further information, follow the hyperlink noted
in the Reference section.
SQL SERVER UPDATES
Security and operating system updates are a fact today. One thing you cannot afford is allowing
Microsoft to restart your server to complete the update process. Set Windows Update to check
for updates. Do not let it automatically install the updates. Any updating could cause an
automatic reboot. The implication is your system goes off-line until the failover occurs.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 19
STEPS FOR UPDATING YOUR CLUSTERED SERVERS 1. Verify or test the updates first ensuring they are safe to install on your production
systems.
2. You should install the updates on your passive server first.
a. This allows your primary server to continue providing service to your customers.
3. Reboot the passive server.
4. Verify that it is working.
5. Failover your primary so that it now becomes the passive server.
6. Repeat steps 2 – 4.
7. There is no need to failover again.
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 20
FAILOVER CLUSTER DIAGRAM
Illustration 1 - Failover Cluster Diagram
David Muise
https://www.linkedin.com/in/davidmuise
P a g e | 21
REFERENCE
1. An Introduction to SQL Server Clusters
http://www.brentozar.com/archive/2012/02/introduction-sql-server-clusters/
2. Conduct your failover tests.
http://www.sqlservercentral.com/articles/cluster/107540/
3. SQL 2012 Failover Cluster Build (Step by Step)
http://blogs.technet.com/b/meamcs/archive/2013/02/15/sql-2012-failover-cluster-build-step-by-
step-part-1-installing-sql-2012.aspx
4. Hosting a Report Server Database in a SQL Server Failover Cluster
https://technet.microsoft.com/en-us/library/bb630402(v=sql.105).aspx
5. Add Reporting Services to Existing Clustered Instance
https://www.mssqltips.com/sqlservertip/2778/how-to-add-reporting-services-to-an-existing-
sql-server-clustered-instance/
6. Adding a generic failover-unaware resource
http://blogs.msdn.com/b/clustering/archive/2009/04/10/9542115.aspx
7. Update Center for Microsoft SQL Server
https://technet.microsoft.com/en-us/sqlserver/ff803383.aspx
8. How to Remove a Node
https://msdn.microsoft.com/en-us/library/ms191545.aspx