0% found this document useful (0 votes)
46 views216 pages

SQL Server 2008/2012: Database Administrator Class 2

This document discusses planning for SQL Server instances in a cluster environment. It covers installing SQL Server instances in a clustered configuration, with two production instances. It also discusses key considerations for planning SQL Server clusters, including using failover clustering to provide high availability, configuring storage, and ensuring the Microsoft Distributed Transaction Coordinator is set up properly based on what SQL Server components are being installed.

Uploaded by

Katrina Lu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views216 pages

SQL Server 2008/2012: Database Administrator Class 2

This document discusses planning for SQL Server instances in a cluster environment. It covers installing SQL Server instances in a clustered configuration, with two production instances. It also discusses key considerations for planning SQL Server clusters, including using failover clustering to provide high availability, configuring storage, and ensuring the Microsoft Distributed Transaction Coordinator is set up properly based on what SQL Server components are being installed.

Uploaded by

Katrina Lu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 216

SQL-DBA-Hands-on C2

SQL Server
2008/2012
Database Administrator
Class 2
Jay Liu
E: [email protected] C: 647-833-5887

1
SQL-DBA-Hands-on C2

Class 2 - (4 hrs)
What have been done so far:
- Installed and configured VMWare environment, and installed 4
Virtual Machines, DC, Node1, Node2 and DR
(Class 1)

2
SQL-DBA-Hands-on C2

Class 2 - (4 hrs)
2.1. Planning SQL Server Instances
2.2. Installing SQL Server Instances in Cluster
- PROD Instance1/Clustered
- PROD Instance2/Clustered
2.3. Patch SQL Server Clustered Instances

3
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Before starting the real work, let us briefly discuss


about the cluster.
The Windows Server Failover Clustering (WSFC) is a
group of independent computer systems, referred to as
nodes, working together as a unified computing
resource.
A cluster provides a single name for clients to use and a
single administrative interface, and it guarantees that
data is consistent across nodes.

4
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Windows Clustering encompasses two different


clustering technologies. These technologies implement
the following two types of clusters.
A network load balancing cluster filters and distributes
TCP/IP traffic across a range of nodes, regulating
connection load according to administrator-defined port
rules. This is out of the scope of this class, and is
usually maintained by System Administrators (SA)
according to the system infrastructure design and
application behaviors.

5
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

A failover cluster provides high availability for


services, applications, and other resources through an
architecture that maintains a consistent image of the
cluster on all nodes and that allows nodes to transfer
resource ownership on demand.
This is the mostly used design when protecting the
production environment which holds key business
applications, to provide High Availability solution to
avoid production failure. Typical usage of this mode is
to protect the SQL Server production database.

6
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Windows clustering enables multiple pieces of


hardware to act as a single platform for running
applications. Each piece of hardware in a cluster is
called a cluster node.
You first must install cluster nodes with an operating
system such as Windows Server 2003 or Windows
Server 2008. Depending on the edition you choose,
different numbers of nodes are supported.

7
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Each Windows cluster has a distinct name along with


an associated Internet Protocol (IP) address. The
cluster name is registered into Domain Name System
(DNS) and can be resolved on the network.
A quorum database is created that contains all the
configuration information for the cluster. All nodes
within a cluster must be in a Windows domain and you
should also configure them in the same domain. You
need to create a domain account that you use for the
cluster administrator account.

8
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

The most complicated elements within a cluster are


groups and resources.
A cluster group is a logical name that is assigned to a
container that holds one or more cluster resources.
A cluster resource consists of anything that is allowed
to be configured on a server.
Examples of cluster resources are IP addresses,
network names, disk drives, Windows services, and file
shares.

9
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

The most granular items that you can configure within


a cluster can be separate into following cluster
resources categories:

You should apply all security best practices for


Windows to each node within a cluster, and disable any
services that are not necessary.
10
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

You need to create an account in the domain that is


used as the cluster administrator account. You should
add this domain account to each node in the cluster as a
member of the local administrators groups prior to
configuring the cluster.
You cannot use a regular user account for the cluster
service; the cluster service must be able to read and
write to the registry, mount and unmount disk drives,
stop and start services, and perform other tasks. These
tasks are possible only under a local administrator
authority.
11
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

You can build clusters by using either Small Computer


System Interface/Internet Small Computer System
Interface (SCSI/iSCSI) drives or Fibre drives;
Integrated Development Environment (IDE) drives are
not supported for clustering.
If you are building a cluster that contains more than
two nodes, have Windows Datacenter, or have the 64-
bit version of Windows, you are restricted to using only
Fibre drives.

12
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Clusters do not support the use of dynamic disks; you


can use only basic disks and mount points for
clustering. Because drive letters A, B, C, and D are
already allocated to local resources on each node, a
total of 22 drive letters can be used.
When configuring the disks, you should allocate a
dedicated drive for use by the quorum.

13
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Check with your Storage Area Network (SAN) vendor


to determine whether your nodes can be booted from
the SAN. If your nodes cannot be booted from the
SAN, or if you are using direct attached storage, you
must install the operating system on an internal hard
drive that you use to boot the node.
In general, installing the operating system on an
internal hard drive on each node is the most common
configuration.

14
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

You need to configure the Microsoft Distributed


Transaction Coordinator (MS DTC) in all clusters. MS
DTC requires disk space on a drive that is configured
as a dependency of the MS DTC resource that you
manually add to the cluster after you create it.
The disk required for MS DTC creates a dilemma for
most administrators. You need to ensure that you have
the maximum number of drive letters to use for
databases while also balancing best practices for
performance and stability.

15
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

The best practices recommendation for a cluster is to


allocate a dedicated disk for the MS DTC resource and
then configure MS DTC and its associated disk drive in
a separate cluster group.
If you are not enlisting MS DTC in your applications,
you are wasting a disk drive that might be put to better
use for databases.

16
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Therefore, if you do not have enough drives to produce


the drive configuration that you need for database
operations and if you are not enlisting MS DTC for any
applications, you can place the MS DTC resource into
the cluster group and set its disk dependency to the
drive that you have configured as the quorum.
This configuration violates best practices, but if you
need the extra drive, and if MS DTC is not taking
advantage of it, you can make this configuration
change for functionality reasons without affecting
cluster operations.
17
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Before installing SQL Server on a failover cluster,


determine whether the Microsoft Distributed
Transaction Coordinator (MSDTC) cluster resource
must be created.
- If you are installing only the Database Engine, the
MSDTC cluster resource is not required.
- If you are installing the Database Engine and SSIS,
Workstation Components, or if you will use
Distributed Transactions, you must install MSDTC.
- Note that MSDTC is not required for Analysis
Services-only instances.
18
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Antivirus software has become very prevalent on


database servers. In a cluster environment, you need to
configure the antivirus scanning so that it does not
interfere with cluster operations.
You must exclude the MSCS directory and all the
directories containing data files from scanning.
During a failover, the disks are mounted on the node
that a group is failing over to, which triggers the
antivirus software to begin scanning the disk.

19
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

If the antivirus software begins scanning a database file


before SQL Server can open it, the recovery of the
database is delayed until the file has been fully
scanned.
Because database files are normally very large,
scanning can add a considerable amount of time to the
failover process.

20
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Each node within a Windows cluster needs at least two


network cards that are configured for public and private
communications.
The public network is the access point for all
applications and external traffic that request data from
the cluster.
The internal (private) network is used for all internode
and inter-cluster communications.
Windows clustering executes periodic health checks,
which determine whether a node is available and can be
used to run applications.
21
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

The most basic health check, which is called a


LooksAlive test, is executed by sending a ping request
from one node in the cluster to another node. If a node
fails to respond to a LooksAlive test, it is considered
unavailable, and the cluster executes a failover process.
If the private network saturates, a LooksAlive test has
the possibility of failing and causing an anomalous
failover. To prevent an anomalous failover, you should
configure the public and private networks on different
subnets.

22
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Resources that are physically attached to a machine


cannot be configured in a cluster, so you might wonder
how disk drives can be defined as a cluster resource.
As described earlier, all data within a cluster must
reside on an external drive array. The external drive
array can be a Fibre channel cabinet attached to each
node in the cluster or a SAN that is connected to all
nodes in the cluster.

23
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

You cannot configure the local hard drive in each node


as a cluster resource. The physical disk drives within
the disk array are not the actual cluster resources. The
disk mount definition within Windows is configured
and controlled by Windows clustering.
Although a disk resource is defined on all nodes, only
the node that is configured to own the disk resource has
the disks mounted and accessible. All other nodes
maintain the disk mount definition, but have the disks
unmounted. This prevents more than one machine from
writing to the same media at the same time.
24
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

The main resource that is configured in a cluster is a


service such as SQL Server or SQL Server Agent.
Although each node in the cluster has an entry for a
given service, it is started only on a single node within
the cluster.
One of the most powerful elements within a cluster is
the way in which IP addresses and network names are
handled.

25
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Although each node in the cluster carries the IP address


and network name definition, only the node designated
as the owner of the IP address and name has it bound to
a physical network card.
When a failover occurs to another node, clustering
performs the following operations on the network
stack:
1. Unregisters the network name from DNS.
2. Binds the IP address to a physical network card on
the operational node.
3. Reregisters the network name in DNS.
26
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

This process ensures that all applications maintain the


same IP address and network name, regardless of the
piece of hardware on which they are currently running.
By preserving the same IP address and network name
through a failover, you do not need to reconfigure
applications to reconnect when a failover happens
within a clustered environment.

27
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

You use cluster groups to combine one or more cluster


resources into a logical management structure. The unit
of failover within a cluster is a group. It can be helpful
to think of a cluster group as an application.
Each SQL Server failover cluster instance that you
create appears as a separate group within a Windows
cluster.

28
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

A two-node Windows cluster is structured as below:

29
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

Now let us look at more details about the Cluster


Heartbeat health check in a clustered environment that
holds SQL Server database running.
When an instance of SQL Server is running in a
Clustered Environment, Microsoft Cluster Service
performs two checks to confirm if the SQL Server
resource is still available.
One is LooksAlive and the other one is IsAlive check.

30
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances

LooksAlive is a basic check in which the Cluster


service queries the Windows Service Control Manager
to check if the SQL Server service is still running. By
default this check happens every 5 seconds.
IsAlive lets the Cluster Service connect to SQL Server
instance using c:\windows\system32\sqsrvres.dll and
runs SELECT @@SERVERNAME against the instance.
This check does not check if the user databases are
online or not. It just checks the SQL Server instance
availability. By default this check happens every 60
seconds.
31
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances


Now, let us check the details of the instances we will install:

- PROD Instance1 (Clustered)


• Cluster Ready (Q: Quorum)
• SQL Instance Name – SQLServer2K8PRD\SQL2K8PRD
• IP – 10.10.10.11
• Cluster Data Drive - E:
• Data/Host – E:\SQLData
• Log – E:\SQLLog
• Tempdb – E:\SQLTempDB
• Backup – E:\SQLBackup

32
SQL-DBA-Hands-on C2

2.1. Planning SQL Server Instances


- PROD Instance2 (Clustered)
• Cluster Ready (Q: Quorum)
• SQL Instance Name – SQLServer2K8PP\SQL2K8PP
• IP – 10.10.10.12
• Cluster Data Drive - F:
• Data/Host – F:\SQLData
• Log – F:\SQLLog
• Tempdb – F:\SQLTempDB
• Backup – F:\SQLBackup

33
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Now let us get started installing SQL Server in Prod/Cluster.


It is better that we have a shared place where the installation
pack resides, so that Node1, Node2 and DR can all run the
installation from the same location.
Let us copy the SQL Server installation pack to DC by the
following steps:
- Create a folder C:\SQLServer2008 on DC
- Share the folder out as \\DC\SQLServer2008
- Copy SQL Server 2008 installation pack into the folder on DC

34
SQL-DBA-Hands-on C2

35
SQL-DBA-Hands-on C2

36
SQL-DBA-Hands-on C2

37
SQL-DBA-Hands-on C2

38
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Note, since the Windows 2003 running on all VMs is 32-bit


version, to save copying time and space on DC, we only need to
copy the SQL Server 2008 32-bit installation pack, which means
only the folder x86 is needed.
After copying your C:\SQLServer2008 folder on DC should
look like below:

39
SQL-DBA-Hands-on C2

40
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Next let us run SQL Server 2008 setup.exe to start installing


instances PRD and PP.
We prefer Node1 is the node where the installation starts. Check
the SQLGRPPRD and SQLGRPPP, and make sure they are both
active on Node1; otherwise fail back to Node1.
From Node1, connect to \\DC\SQLServer2008 to access the
folder where SQL Server 2008 installation pack resides. To do
so, go to Start, then Run, and type in \\DC\SQLServer2008, and
then press Enter or click on OK.
Go to folder \\DC\SQLServer2008 and locate setup.exe to start
the installation, and then double-click on it to launch the
installation. Click Run in Security Warning page.

41
SQL-DBA-Hands-on C2

42
SQL-DBA-Hands-on C2

43
SQL-DBA-Hands-on C2

44
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Click OK when being asked to install a hotfix for Windows


Installer required by SQL Server 2008 installation.
Click Next

45
SQL-DBA-Hands-on C2

46
SQL-DBA-Hands-on C2

47
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

For License Agreement, click I Agree, and then Next.

48
SQL-DBA-Hands-on C2

49
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Click Finish once the installation is completed.

50
SQL-DBA-Hands-on C2

51
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Click OK then restart Node1.


Note, after restart Node1, fail back all groups from Node2 to
Node1.
Then restart setup.exe

52
SQL-DBA-Hands-on C2

53
SQL-DBA-Hands-on C2

54
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Now following the steps below to continue.


- Click on Installation in the left hand site
- Click on New SQL Server failover cluster installation
- Click on Run in Security Warning page
- To serve you better in display, we can change the resolution of
the display mode to higher setup (i.e., 800x600).

55
SQL-DBA-Hands-on C2

56
SQL-DBA-Hands-on C2

57
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In completion of Setup Support Rule, click OK to continue.


- In Product Key page, type in product key.

Note: The product key shown in this document is used for


creating the screen copy and demonstrating the installation
process purposes only. In case you want to keep your SQL
Server running, you should obtain your own legally licensed
product key.

58
SQL-DBA-Hands-on C2

59
SQL-DBA-Hands-on C2

60
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- Click on Next to continue after entering the license key.


- Check Accept License, then Next.
- Click Install for Setup Support Files.

61
SQL-DBA-Hands-on C2

62
SQL-DBA-Hands-on C2

63
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster


- After Setup Support Rule finishes, view the result and make
sure there are no errors (warnings can be ignored normally).
- Click on Next to continue.

64
SQL-DBA-Hands-on C2

65
SQL-DBA-Hands-on C2

66
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- For Production environment, it is quite common to only install


Database engine, and leave BI tools to an isolated environment
that has data in synch with production databases, like the
reporting environment; so let us choose the minimum/least
choices to install our Production environment.
- Make selection as shown in the following page.
- Click Next to continue.

67
SQL-DBA-Hands-on C2

68
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In the Instance Configuration page, do the following:


SQL Server Network Name: SQLServer2K8PRD
Choose Named Instance, instance name: SQL2K8PRD
Instance Root Folder: leave C: with the default path.
- Then Click on Next to continue.

Note, Network Name can be different with maximum 15


characters; if you choose to use different name, you should be
using that name for future uses when playing all cases.

69
SQL-DBA-Hands-on C2

70
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In the Disk Space review page, click on Next to continue.


- In the Cluster Resource Group page, select SQLGRPPRD
from the group name dropdown list, then click Next.

71
SQL-DBA-Hands-on C2

72
SQL-DBA-Hands-on C2

73
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In the Cluster Disk Selection page, select E: drive, and then


click Next.
- In Cluster Network Configuration page, check IPv4, type in
10.10.10.11 for the IP, then click Next.

74
SQL-DBA-Hands-on C2

75
SQL-DBA-Hands-on C2

76
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In Security Policy page, click on Browse for both engine and


agent, and then type in SQLSRVGRP, check name, click OK.
- Indicate the domain group for Agent as well.
- Then click on Next.

77
SQL-DBA-Hands-on C2

78
SQL-DBA-Hands-on C2

79
SQL-DBA-Hands-on C2

80
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In Server Configuration page, click on “Use same account for


all SQL Server services”, then click on Browse, and type in
SQLService, click on Check Name, and then OK.
- Type in the password for SQLService (Vic2006).
- Click on dropdown box for Full-text account, select Browse.
- Use the same way to get SQLService, and then type in
password besides.
- Click on Collation tab to make sure collations are OK.
- Click on Next to go to next page.

81
SQL-DBA-Hands-on C2

82
SQL-DBA-Hands-on C2

83
SQL-DBA-Hands-on C2

84
SQL-DBA-Hands-on C2

85
SQL-DBA-Hands-on C2

86
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In Database Engine Configuration page, Account Provisioning


tab, Do the following setup:
Check Mixed Mode
Type in “sa” password, (Vic2006)
Click on “Add Current User” button to add domain admin as a
sysadmin member.
- Then click on Data Directories tab.

87
SQL-DBA-Hands-on C2

88
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In Data Directories tab, leave the path with no change, but


adjust the drives as below:
Data root: E:
User database: E:
User database log: E:
Temp DB: E:
Temp DB log: E:
Backup: E:
- Then click FILESTREAM
- In FILESTREAM tab, enable FILESTREAM for both T-SQL
access and file I/O access.
- Click Next to move to next step.

89
SQL-DBA-Hands-on C2

90
SQL-DBA-Hands-on C2

91
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In Error and Usage Reporting page, leave both unchecked, and


click Next.
- Upon completion of Cluster Installation Rules, click Next.

92
SQL-DBA-Hands-on C2

93
SQL-DBA-Hands-on C2

4.3. Installing SQL Server – Prod-Clustered

94
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In “Ready to Install” summary page, verify everything is fine.


- Then click on Install. Installation is now started and running.

95
SQL-DBA-Hands-on C2

96
SQL-DBA-Hands-on C2

97
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- Wait for installation finished, and then click Close.

98
SQL-DBA-Hands-on C2

99
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- We have completed Node1 setup for SQL2K8PRD instance.


Go to Cluster Admin, and view the SQLGRPPRD group
resources. Make sure SQL Server services and resources are
online and running.

100
SQL-DBA-Hands-on C2

101
SQL-DBA-Hands-on C2

102
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- Go to Node2, and launch SQL Server setup.exe, we will add


Node2 into SQL Server cluster configuration for SQL2K8PRD.
- Launch setup.exe. For better display, we better change the
resolution to bigger size (i.e. 800x600).
- Click Run when Security Warning prompted.
- When prompted to install a hot fix, do it like we did for Node1,
and then restart Node2.

103
SQL-DBA-Hands-on C2

104
SQL-DBA-Hands-on C2

105
SQL-DBA-Hands-on C2

106
SQL-DBA-Hands-on C2

107
SQL-DBA-Hands-on C2

108
SQL-DBA-Hands-on C2

109
SQL-DBA-Hands-on C2

110
SQL-DBA-Hands-on C2

111
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- After Node2 comes back, login and rerun setup.exe, just like
what is done for Node1.
- Choose Installation, and then select “Add node to a SQL
Server failover cluster”. When prompted as Security Warning,
click Run to continue.
- Click OK when Setup Support Rules completes.

112
SQL-DBA-Hands-on C2

113
SQL-DBA-Hands-on C2

114
SQL-DBA-Hands-on C2

115
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In Product Key page, enter the license key, and click Next to
continue.

Note: The product key shown in this document is used for


creating the screen copy and demonstrating the installation
process purposes only. In case you want to keep your SQL
Server running, you should obtain your own legally licensed
product key.

116
SQL-DBA-Hands-on C2

117
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- Accept License Agreement, and click Next.


- Install Setup Support Files.
- In Setup Support Rules, make sure there is no error found; then
click Next to continue.

118
SQL-DBA-Hands-on C2

119
SQL-DBA-Hands-on C2

120
SQL-DBA-Hands-on C2

121
SQL-DBA-Hands-on C2

122
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In Cluster Node Configuration, click Next to continue.


- In Service Accounts page, type in password (Vic2006) for the
SQLService account to start services like done for Node1, and
then click Next.

123
SQL-DBA-Hands-on C2

124
SQL-DBA-Hands-on C2

125
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- Click Next in Error Report page.


- Click Next in Add Node Rules page.

126
SQL-DBA-Hands-on C2

127
SQL-DBA-Hands-on C2

128
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- In the Ready to Add Node summary page, click Install to start


installing SQL Server on Node2.
- Upon completion of installation, click Close to finish.
- We are now completed SQL2K8PRD cluster installation!

129
SQL-DBA-Hands-on C2

130
SQL-DBA-Hands-on C2

131
SQL-DBA-Hands-on C2

132
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- Now let us verify to confirm SQL2K8PRD cluster instance is


working properly.
- Go to Node1, Start – Programs – Microsoft SQL Server 2008,
choose SQL Server Management Studio (SSMS).
- Make sure the Server name is pointing to:
SQLSERVER2K8PRD\SQL2K8PRD, click on Connect button.
- Be sure your connection is successful.

133
SQL-DBA-Hands-on C2

134
SQL-DBA-Hands-on C2

135
SQL-DBA-Hands-on C2

136
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- Go to Cluster Administrator, move the SQLGRPPRD group.


- Wait for SQLGRPPRD is back online on Node2.
- Fresh your connection the SQL2K8PRD instance again, you
should also be able to connect to the instance successfully.
- We have now confirmed the SQL2K8PRD instance is
functioning well in the cluster.
- For solid confirmation, you can testy failing over and back for
a few more times to make sure everything is working correctly.

137
SQL-DBA-Hands-on C2

138
SQL-DBA-Hands-on C2

139
SQL-DBA-Hands-on C2

140
SQL-DBA-Hands-on C2

141
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Repeat the same steps for installing the 2nd instance SQL2K8PP
into the cluster as we did for SQL2K8PRD.
Note the following differences from installing SQL2K8PRD:
- You may not see the screen to enter Product Key again when installing the
second instance as it is already registered in the server.
- You will not need to choose installing SQL Server Client Tools (actually
you cannot) again because they only to be installed once as shared
components.
- SQL Server Network Name: SQLServer2K8PP
- SQL Server Instance Name: SQL2K8PP
- Cluster Group: SQLGRPPP
- Cluster Disk: DriveF
- IP: 10.10.10.12
- Data Directory: F:\...

142
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

After installing SQK2K8PP on Node1, your cluster resources


look like following screen snapshots.

Once installation of SQL2K8PP on Node1 is completed, add


Node2 for SQL2K8PP, and then test the failover and failback to
make sure SQL2K8PP working properly.

143
SQL-DBA-Hands-on C2

144
SQL-DBA-Hands-on C2

145
SQL-DBA-Hands-on C2

146
SQL-DBA-Hands-on C2

147
SQL-DBA-Hands-on C2

148
SQL-DBA-Hands-on C2

149
SQL-DBA-Hands-on C2

150
SQL-DBA-Hands-on C2

151
SQL-DBA-Hands-on C2

152
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Last, login and add Node2 for SQK2K8PP. Following steps are
special for this task.
- In Cluster Node Configuration, choose SQL2K8PP
- In Ready to Add Node, verify all options are correct.
- Once adding node is completed, test failover and failback to
confirm SQL2K8PP is working well.

153
SQL-DBA-Hands-on C2

154
SQL-DBA-Hands-on C2

155
SQL-DBA-Hands-on C2

156
SQL-DBA-Hands-on C2

157
SQL-DBA-Hands-on C2

158
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

Now, from either Node1 or Node2, you can launch SSMS, and
you are able to connect to both SQL Server instances
SQL2K8PRD and SQL2K8PP.

159
SQL-DBA-Hands-on C2

160
SQL-DBA-Hands-on C2

161
SQL-DBA-Hands-on C2

162
SQL-DBA-Hands-on C2

163
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

- By now, you have successfully installed SQL Server instances,


SQL2K8PRD and SQL2K8PP, in the cluster.

Next step:
- Patch SP2 to SQL2K8PRD and SQL2K8PP.
- Install DR, RPT and Branch instances in DR VM.
- Patch 3 instances in DR.

164
SQL-DBA-Hands-on C2

2.2. Installing SQL Server Instances in Cluster

To prepare those, let us first copy-paste the SQL Server SP2 file
into \\DC\SQLServer2008.
Note, for the class stuff, we use x86 as we have Windows 2003
32-bit version installed for practice. If you are running the cases
on Windows 64-bit (Windows 7 64-bit), you need to copy the
x64 SP2 file.

165
SQL-DBA-Hands-on C2

166
SQL-DBA-Hands-on C2

167
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

So far you have successfully installed SQL Server in cluster with


instances SQL2K8PRD (SQLServer2K8PRD\SQL2K8PRD) and
SQL2K8PP (SQLServer2K8PP\SQL2K8PP).
Let us apply the Service Pack 2 into it and make it finally ready
for use.
Patch is located on \\DC\SQLServer2008 as we copied at the end
of last class, SQLServer2008SP2-KB2285068-x86ENU.exe.
Following the steps below to complete patching SP2.

168
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

- Turn on both Node1 and Node2, make sure we start running


SP2 on the node where the SQL cluster groups (SQLGRPPRD
and SQLGRPPP) are currently active on. The slide assumes it is
Node1.
- From Node1, connect to \\DC\SQLServer2008 to locate the
SP2 exe file via the shared folder, then double-click on it to
start.
- Click on Run in Security Warning page.
- Make sure there is no error (only warnings) in Welcome page.
- Click on Next to continue.
- Click on Accept for License Term, then Next to move on.

169
SQL-DBA-Hands-on C2

170
SQL-DBA-Hands-on C2

171
SQL-DBA-Hands-on C2

172
SQL-DBA-Hands-on C2

173
SQL-DBA-Hands-on C2

174
SQL-DBA-Hands-on C2

175
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

- In Select Features, click Next. You can select any instance(s)


to install, or simply as default, select all instances that require
the SP2 to be applied. SQL Server SP2 will run update on all of
them at once.
- In Check Files in Use page, there are 3 services in the list for
each instance, meaning SP2 cannot complete unless the server is
rebooted, due to files are on hold by those services. Let us get it
fixed.

176
SQL-DBA-Hands-on C2

177
SQL-DBA-Hands-on C2

178
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

- Go to Cluster Administrator, locate SQLGRPPRD, expand it,


we see those 3 services under the group are running.
- Right click on service called SQL Server (SQL2K8PRD), and
choose Take Offline.
- Wait for a while, until all 3 services are offline.
- Repeat the same for SQL2K8PP instance.

179
SQL-DBA-Hands-on C2

180
SQL-DBA-Hands-on C2

181
SQL-DBA-Hands-on C2

182
SQL-DBA-Hands-on C2

183
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

- Go back to the SP2 installation window, click on Refresh


Check. Those 3 services of each instance should not be listed
anymore, meaning we can complete SP2 installation without
rebooting the server. However, it is always better to reboot
server after running any patching, even it is not required by the
installation.
- Click on Next in Check Files page.
- In Ready to Update summary page, click Update to run SP2.
- The SP2 installation is running.
- Upon completion, click Next.
- Finally click on Close to finish.

184
SQL-DBA-Hands-on C2

185
SQL-DBA-Hands-on C2

186
SQL-DBA-Hands-on C2

187
SQL-DBA-Hands-on C2

188
SQL-DBA-Hands-on C2

189
SQL-DBA-Hands-on C2

190
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

- After SP2 is installed, SQL Server installer automatically starts


all patched instances and leaves them active online on Node1.
- Check all cluster resources are back online and active on
Node1 with no offline, and leave them as they are.
- Now log in to Node2, and run SP2 as we did in Node1.
- NOTE: There is no need to failover SQL2K8PRD and
SQL2K8PP to Node2, keeping them both online on Node1 is
fine for running this patch.
- Follow the same steps as for Node1.
- Upon completion, click Next.
- Finally click Close to finish.

191
SQL-DBA-Hands-on C2

192
SQL-DBA-Hands-on C2

193
SQL-DBA-Hands-on C2

194
SQL-DBA-Hands-on C2

195
SQL-DBA-Hands-on C2

196
SQL-DBA-Hands-on C2

197
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

- To verify the installation of SP2, in Node1 or Node2, launch


SSMS, connect to SQL2K8PRD and SQL2K8PP.
- This verification is done when SQL2K8PRD and SQL2K8PP
both running on each node.
- On Node1 or Node2 (the slides show as Node2), launch SSMS.
- In Cluster Administrator, make sure SQLGRPPRD and
SQLGRPPP are both active on Node1.
- In SSMS, click Connect -> Database Engine, then Connect to
SQLServer2K8PRD\SQL2K8PRD.
- When connected, verify the version.
- The version of instance SQL2K8PRD should be 1.0.4000.

198
SQL-DBA-Hands-on C2

199
SQL-DBA-Hands-on C2

200
SQL-DBA-Hands-on C2

201
SQL-DBA-Hands-on C2

202
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

- Click Connect -> Database Engine, then Connect to


SQLServer2K8PP\SQL2K8PP.
- When connected, verify the version.
- The version of instance SQL2K8PP should be 1.0.4000.

203
SQL-DBA-Hands-on C2

204
SQL-DBA-Hands-on C2

205
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

- Now on the same node, in Cluster Administrator, move the


groups SQLGRPPRD and SQLGRPPP to another node. In the
slide, it is to move from Node1 to Node2.
- Wait for the failover completes, and then recheck the SQL
instance version of SQL2K8PRD and SQL2K8PP. They both
should be 1.0.4000.

206
SQL-DBA-Hands-on C2

207
SQL-DBA-Hands-on C2

208
SQL-DBA-Hands-on C2

209
SQL-DBA-Hands-on C2

210
SQL-DBA-Hands-on C2

211
SQL-DBA-Hands-on C2

212
SQL-DBA-Hands-on C2

213
SQL-DBA-Hands-on C2

214
SQL-DBA-Hands-on C2

2.3. Patch SQL Server Clustered Instances

SQL Server SP2 has been applied on Production cluster SQL


Server instances!
Next, let us complete the SQL Server DR instances’ installation
and patch them to SP2.
Note, we should always apply the most up-to-date, and this is
why in this course materials, SP4 is prepared indeed.

215
SQL-DBA-Hands-on C2

Q&A

Thanks and See You Next Time

216

You might also like