View
228
Download
0
Category
Preview:
Citation preview
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 1/25
Clustering SQL Server
Tom Pullen
Senior DBA, RM Education
tpullen@rm.com
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 2/25
Agenda
Why Cluster? Is it worth the hassle and expense?
How does it compare to other HA
technologies?
How to Cluster
plan
prepare
execute
test/monitor
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 3/25
Why Cluster?
High availability requirements 24X7, patching, hotfixes
Cost and Benefit
Requirements: hardware, software, licenses
Alternatives: comparing clustering with other HA technologies
Limitations what does clustering not protect you from?
Combining clustering with other HA technologies
log shipping, mirroring, offloading reporting load
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 4/25
How to cluster
Plan
Prepare
Execute
Test
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 5/25
Plan
1. Consult your users/boss/finance director!2. Design your cluster: Nodes, Instances, Storage
3. Write a plan for build
4. Write a plan for migration/go-live
5. Think of everything!
6. Get your plans and design peer-reviewed
7. Think about failure how to go back?
8. Plan decision points when/if to proceed, or give
up & the points of no return
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 6/25
Prepare
Do everything you can in advance
- create security accounts
- obtain/reserve IP addresses
- obtain install media and SP install files
- ensure you accurately estimate the time requirements be conservative!
- plan downtime, advertise downtime, arrange holding pages
- think about all the other things you normally need on a new server:
logins, jobs, configs, SPs, backup software, backup location, tapes?, database mail, alerts etc!
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 7/25
Execute
Print your plan
Follow it
Mark your progress
Give yourself incentives!
Publicise your progress
Get help if you encounter problems
Be willing to give up if necessary
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 8/25
Steps in clustering
Build servers, OS, AD, networking, SAN/LUN presentation [orhave this done for you] check everything!
Install/configure MSDTC
Install clustering
Create cluster groupsCluster MSDTC
Test failover
Install SQL Server instance(s)
Service Pack/Hotfix/Cumulative Update(s)Configure
Do all the other normal things! (Jobs, logins etc)
Test failover and failure
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 9/25
MSDTC
MSDTC UnderWindows 2003, it is a painMSKB docs can be misleading
How to enable network DTC
http://support.microsoft.com/kb/817064
How to cluster MSDTC
http://support.microsoft.com/kb/301600
E nable network DTC on each node and set permissions B EFORE clustering
UnderWindows 2008/SQL Server 2008, things are much improved!
If you get into a tangle clustering MSDTC, it is sometimes quicker to strip everythingout (cluster .. /forcecleanup) and start again!
Clustering itself is easier than getting MSDTC right!
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 10/25
Cluster!
Shut down all but the first node
Cluster Administrator new cluster
Enter name, IP, Quorum disk
Switch on other server(s) and add them to the cluster
Configure heartbeat network
Create cluster groups and disk resources ready for SQL
Server to install into
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 11/25
Cluster Administrator
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 12/25
A group before SQL Server is installed
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 13/25
cluster.exe command example
CLUSTER /CLUSTER:SQLCLUS01 GROUP "BACKUP1" /CREATE
CLUSTER /CLUSTER:SQLCLUS01 GROUP "BACKUP1" /ONLINE
CLUSTER /CLUSTER:SQLCLUS01 GROUP "BACKUP1" /SETOWNERS:SQL05
CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "LUN U_BAK" /CREATE /GROUP:"BAK_SHARE" /TYPE:"Physical Disk" /PRIV DRIVE="U:" /OFFLINE
CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "LUN U_BAK" /ONLINE
CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "Backup IP Address Public" /CREATE /GROUP:"BACKUP1" /TYPE:"IP Address" /PRIV
ADDRESS="194.168.190.44" /PRIV SUBNETMASK="255.255.255.0" /PRIV NETWORK="Public" /OFFLINE
CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "Backup Network Name Public" /CREATE /GROUP:"BACKUP1" /TYPE:"Network Name" /PRIV
NAME="SQLCLUS01BAK" /OFFLINE
CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "Backup Network Name Public" /ADDDEPENDENCY:"Backup IP Address Public"CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "Backup Network Name Public" /PRIV RequireKerberos=0
CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "Backup_Share" /CREATE /GROUP:"BACKUP1" /TYPE:"File Share" /PRIV SHARENAME="BACKUPS1"
/PRIV PATH="U:\" /OFFLINE
CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "Backup_Share" /ADDDEPENDENCY:"Backup Network Name Public"CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "Backup_Share" /ADDDEPENDENCY:"LUN U_BAK"CLUSTER /CLUSTER:SQLCLUS01 RESOURCE "Backup_Share" /PRIV Security="Everyone",set,C:security
CLUSTER /CLUSTER:SQLCLUS01 GROUP "BACKUP1" /OFFLINE
CLUSTER /CLUSTER:SQLCLUS01 GROUP "BACKUP1" /ONLINE
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 14/25
Install SQL Server Instance(s)Run setup!
Do you like unattended installs/batch files?
SQL Server 2005 runs multiple times automatically on each node using Task SchedulerSQL Server 2008 must be installed on each node
Interactive install of SQL Server requires you to specify:-
Components to install
Instance Name, Virtual Server Name + IP, Cluster Group, Cluster Node ConfigurationSetup account info
Service account
Domain group for cluster services
Authentication mode
Collation
Error usage & reporting
Unattended install requires you to specify all of these in the config fileDo it all over again for each instance!
Service pack does each engine instance on each node. Must be run from active node.
Dont forget to Service Pack Tools, Shared Components, SSIS, SSNAC/connectivity, etc
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 15/25
Install SQL Server Instance(s)
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 16/25
Now make your instance like you normally would!
Configure!
RAM especially. Think about min, max, what can be where?
MAXDOP? Max worker threads?
Logins
Jobs
Alerts
Database MailSPs in system DBs?
Startup SPs
Trace Flags
Auditing
Maintenance
Sysmessages? Static data? Resize system DBs? Move/split tempdb files?
Any other things that are particular to your environment
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 17/25
Test!
Test failover
Test failure
Fix issuesRun each instance on every Node it can exist
on and check it is ok
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 18/25
Migrate
Get your User DBs on migrate or create?
Populate
(Re)point your appsTest your apps
Anything else? (Replication?)
Reporting services? Analysis Services?
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 19/25
Monitor
Enable alerts
Failover startup SP?
Monitor performanceMonitor availablility
Monitor disk space
Monitor your monitor!
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 20/25
Some real-world clusters
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 21/25
Some real-world clusters
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 22/25
Some real-world clusters
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 23/25
Some real-world clusters
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 24/25
Summary
Failing to plan is planning to fail
Write your plan and follow it!
Dont be scared of clusteringKnow where to find help
Practice if you can with test servers
Dont panic! But feel free to curse MSDTC...
8/8/2019 Implementing Clustering Using SQL Server - Tom Pullen
http://slidepdf.com/reader/full/implementing-clustering-using-sql-server-tom-pullen 25/25
Good ResourcesHow to clusterWindows 2003http://www.sql-server-performance.com/articles/clustering/cluster_server_2003_p1.aspx
How to cluster SQL Server 2005http://www.sql-server-performance.com/articles/clustering/cluster_sql_server_2005_p1.aspx
MSDN Clustering Bloghttp://blogs.msdn.com/clustering/
Windows 2008 Clustering Step-By-Stephttp://technet.microsoft.com/en-us/library/bb727114.aspx
Windows 2003 Microsoft White Paper (comprehensive!)http://www.microsoft.com/downloads/details.aspx?familyid=96F76ED7-9634-4300-9159-89638F4B4EF7&displaylang=en
Recommended