Documente Academic
Documente Profesional
Documente Cultură
By
Kareem Syed
www.optimizesql.blogspot.in
www.optimizesql.com/blog
SQLDBA
Agenda
www.optimizesql.com/blog
SQLDBA
HA Overview
www.optimizesql.com/blog
3
SQLDBA
Importance of HA
Maintenance
Upgrade
Software or Hardware
Updates
Accidently
Power Outages
Disasters
www.optimizesql.com/blog
4
SQLDBA
Introduction to Clustering
Group of two or more servers (Nodes) that work
together and represent themselves as single Server
(Virtual Server) in the network.
A server cluster is a collection of servers, called nodes
that communicate with each other to make a set of
services highly available to clients.
Server clusters are designed for applications that have
long running in-memory state or frequently updated
data.
www.optimizesql.com/blog
SQLDBA
Introduction
A Microsoft SQL Server Cluster is simply a collection of two or
more physical servers.
These Servers are called Nodes.
These nodes have same access to shared storage and
provides the resources required to store the database files
Each of the nodes talk to one another via a network
If one node does not communicate to the other node the other
node will take ownership of SQL Server service. This process
is called fail over.
A failover can occur both automatically (a server stops
communication for some reason) or manually.
www.optimizesql.com/blog
SQLDBA
Basic Architecture
Client PCs
SQL Server
Server A
Virtual
Server
Server B
Heartbeat
Binn
Install
Upgrade
Cluster management
Shared
Disk Array
Hub
C,D
Hub
SQL Server
www.optimizesql.com/blog
Binn
Install
Upgrad
Backup
Data
FTData
Job, Log, repldata
SQLDBA
C,D
Basic Architecture
Client PCs
SQL Server
Server A
Virtual
Server
Server B
Heartbeat
Cluster management
Shared
Disk Array
Hub
C,D
Hub
C,D
SQL Server
www.optimizesql.com/blog
SQLDBA
Importance of HA
Feature
Database
Mirroring
Failover
Clustering
Log Shipping
Data Loss
No data loss
option
No data loss
Maybe
Failover
Automatic failover
option
Automatic failover
No
Failover time
seconds
~ 20+ seconds
Manual
Special
Hardware
No
Certified hardware
No
Redundancy
Complete
redundancy
Complete redundancy
Multiple
Secondaries
No
No
Yes
Standby Read
Access
Yes, through
snapshot
No
Granularity
Database
Instance
Database
Conn String
Two
ONE
Two
www.optimizesql.com/blog
SQLDBA
Advantages
High Availability
Protection from failures
Online Administration
Software/hardware upgrades/patch and restart with minimal downtime.
Increased Scalability
In some cases, clustering can be used to increase the
scalability of an application. For example, if a current cluster is getting
too busy, another server could be added
to the cluster to expand the
resources and help boost the performance of the
application.
www.optimizesql.com/blog
SQLDBA
10
Advantages
Manageability
Enables managing resources within entire cluster if we are managing a
single computer.
www.optimizesql.com/blog
SQLDBA
11
Advantages
Reduces downtime.
Allows for an automatic response to a failure in hardware/
software.
Allows you to perform upgrades without forcing users off the
system for extended periods of time.
Clustering doesnt require any servers to be renamed. So
when failover occurs, it is relatively transparent to end-users.
Failing back is relatively quick, and can be done whenever the
primary server is fixed and put back on-line.
In some cases, clustering can be used to increase the
scalability of an application. For example, if a current cluster is
getting too busy, another server could be added to the cluster
to expand the resources and help boost the performance of the
application
Clustering is transparent to the callingSQLDBA
application.
www.optimizesql.com/blog
12
Disadvantages
Failover Cluster is NOT designed to:
Protect data
Protect against a shared disk array from failing.
Load Balance
Prevent server from potential data disasters.
Requires more on-going maintenance than other alternatives.
Requires more experienced DBAs and network
administrators.
www.optimizesql.com/blog
SQLDBA
13
Disadvantages
www.optimizesql.com/blog
SQLDBA
14
Clusterable
SQL Server
SQL Server Agent
Analysis Services
Non Clusterable
www.optimizesql.com/blog
SQLDBA
15
SQLDBA
16
Basic Architecture
Virtual Name
Public Network
Node1
Active
SQL
Instance1
Heart Beat
Private Network
SAN
Shared Storage
Active/Passive Cluster
www.optimizesql.com/blog
SQLDBA
Node2
Passive
Basic Architecture
Virtual Name
Public Network
Node1
Active
SQL
Instance1
Heart Beat
Private Network
SAN
Shared Storage
Active/Active Cluster
www.optimizesql.com/blog
SQLDBA
Node2
Active
SQL
Instance2
Basic Components
Private, Public
Storage (optional)
SQLDBA
Failover Clustering
Terminology
www.optimizesql.com/blog
SQLDBA
20
Failover Clustering
Terminology
Heartbeat
www.optimizesql.com/blog
SQLDBA
21
Failover Clustering
Terminology
Failover
www.optimizesql.com/blog
SQLDBA
22
Failover Clustering
Terminology
Failback
www.optimizesql.com/blog
SQLDBA
23
Failover Clustering
Terminology
Quorum Resource
www.optimizesql.com/blog
SQLDBA
24
Failover Clustering
Terminology
Resource Group
www.optimizesql.com/blog
SQLDBA
25
Failover Clustering
Terminology
LUNs
www.optimizesql.com/blog
SQLDBA
26
Preparing Windows
Clustering
Ensure that all nodes are working properly and are configured properly.
Confirm that each node can access shared array or SAN drives.
Verify that none of the nodes have been configured as domain controller.
Verify that all drives are NTFS and are not compressed.
Ensure that private and public networks are properly configured.
Verify that you have disabled NetBIOS for all private network cards.
Verify that Windows Task Scheduler service is running on each node.
Take a domain admin account for configuring windows cluster.
Use separate account for cluster service.
Add cluster service account to the Local Administrators group of all the
nodes in the cluster.
Decide windows cluster virtual name and virtual IP.
www.optimizesql.com/blog
SQLDBA
27
Preparing Windows
Clustering
Quorum
MSDTC
TempDB
User Defined database data files
User Defined database T.Log files
Backups
www.optimizesql.com/blog
SQLDBA
28
Preparing Windows
Clustering
IP Address Requirements
Name of Resource
IP Address
MSDTC
www.optimizesql.com/blog
SQLDBA
29