Set Title in 40pt. No more than 2 lines

DBA-518 Advanced Failover Clustering Installation
Techniques with SQL Server 2008 and Windows
Server 2008
Allan Hirt – Megahirtz LLC
[email protected]
Agenda
• Windows Server 2008 RTM & R2 failover
clustering
• SQL Server 2008 failover clustering
• Summary
Before We Go Any Further …
• Three flavors of clustered SQL Server installations
• Traditional – install instance(s) of SQL or Analysis
Services on top of a Windows failover cluster
• Cluster Windows and implement SQL Server-based
servers as VMs
• Cluster two or more VMs
• SQL 2K5 or SQL 2K8 only
• W2K8 guest OS only
• Core variant of W2K8 (RTM or R2) not supported
for SQL Server
Adding the Failover Clustering Feature
• Failover Clustering is a feature, not role
• Three ways to add:
• Server Manager (GUI)
• Servermanagercmd.exe (RTM and R2, depreciated
in R2)
• PowerShell (R2, but can be used against RTM)
Let’s Talk Networking 1
• SQL Server does not support multiple
subnets feature of W2K8 failover clustering
• Must still use VLAN if configuring a
geographically dispersed cluster
• W2K8 R2 supports network prioritization
• Set via PowerShell
Let’s Talk Networking 2
• Number of NICs needed:
• Traditional config:
• Minimum of two (Public, Private)
• Live Migration
• Should have at least four (Public, Private, Live
Migration, CSV)
• Maybe management and guest only NICs as well
• Dedicated NIC for iSCSI (if used) in both
scenarios – not negotiable on clusters
Firewall Configuration
• Watch your firewall configuration
• By default, it’s on – and there can be up to 3
• Recommendation: disable
• However, use common sense and follow your corporate security
guidelines
• If on, can cause things like:
• Unwanted RPC errors
• Inability for Management Studio to see SQL Server instances
hosted on a particular cluster node
• If left on, make exceptions (both inbound and outbound
rules) for things like the SQL Server port number
Disk Configuration 1
• Drive types supported: only SAS, iSCSI, Fibre; no old
parallel SCSI
• Storage must be SCSI-3 SPC-3 command compliant
• Must also support persistent reservations
• Still need at least one drive letter per clustered
instance of SQL or Analysis Services
• Can select multiple drives during SQL Server install
• Rename drives to make them easier to discern
• Must be done in PowerShell
Disk Configuration 2
• Live Migration/Clustered VMs with SQL
• Enable Cluster Shared Volumes
• Can use passthrough disks or place on CSV
• Strong recommendation: place at least the OS on the
CSV
Cluster Validation 1
• W2K8 no longer relies on the HCL/Server
Catalog
• Hardware must be logoed for W2K8
• Must re-run with hardware or major config
change
• Run via Failover Cluster
Manager/Management or PowerShell (R2 only)
• PowerShell syntax:
Test-Cluster –Node Node1, … , NodeN
Cluster Validation 2
• Tests can take some time to run (especially with a
lot of disks and nodes)
• Report location: %windir%\Cluster\Reports
• If there is a failure, re-run single test to test the
problem
• SQL Server 2008’s installation is dependent on a
successful validation
• IMPORTANT: Prevent a false positive for the SQL Server
install – run ALL tests again; DBAs should check the report
prior to installing SQL
Installing .NET Framework on
Windows Server 2008
• Need 3.51 for x86 (RTM), x64 (RTM/R2); 2.0
SP2 (IA64)
• How to install depends on the version of
Windows
• RTM: Can use standalone installers or SQL
Server 2008 install media
• R2: Windows only; get an error otherwise but …
• The obvious way (Server Manager) is not so obvious
• Best way: use DISM
dism.exe /online /enable-feature /featurename:NetFx3
Post-Clustering Windows Tips
• Rename the networks
• If present, disable iSCSI network for cluster
traffic
• Testing failover is the same essentially, but …
• The main cluster group and the storage group
cannot manually be failed over FCM
• Must use cluster.exe (pre-W2K8 R2) or PowerShell
Microsoft Distributed Transaction
Coordinator
• No controversy with SQL 2K8: it is NOT
required
• See Shon’s talk from Tuesday (DAT-X69-C) for
great recommendations
• Associating with a SQL instance:
msdtc –tmMappingSet –name <dtc name> -service <SQL
service name> -clusterResourceName “<SQL resource
name in cluster”
VMs as a Failover Cluster
• Supported as of May, 2009
• W2K8 OS for guests only
• SQL 2K5 or SQL 2K8
• Will need some sort of shared storage
• Recommendations:
• Map virtual NICs to different networks/NICs at the
hypervisor level
• Place the VMs on separate hypervisors
• Bottom line: same rules as a physical cluster apply
Live Migration and SQL Server
• Fully supported
• Add the Hyper-V role
• Can mix traditional SQL Server clustered
instances + VMs
• Ways to configure VMs with Hyper-V on a cluster:
• Hyper-V Manager + Failover Cluster Manager
• Failover Cluster Manager
• SCVMM R2 (GUI or PowerShell)
Agenda
• Windows Server 2008 RTM & R2 failover
clustering
• SQL Server 2008 failover clustering
• Summary
Types of SQL Server 2008 Failover
Clustering Installs
• New instance
• GUI and Command Line/INI
• Two variations: normal and cluster prep
• Upgrade existing instance of 2000 or 2005
• SQL 2K8 is the first version to support
command line/INI upgrades for clustered
instances
• Patch/Update – i.e. CU/Service Pack
New Installation Gotchas, Tips, and
Tricks
• Installing is a node by node, instance by instance affair
• Solves occasional issues selected customers had with
previous single-shot installers
• One main install for each instance, all others add node
operations
• Still do not recommend placing SQL Server and Analysis
Services in the same group
• Slipstream with SP1 and beyond
• W2K8 R2 requires SQL Server 2008 to be at SP1 anyway
Instance ID
• Recommendation: make it the same as the
instance name
GUI Pitfalls
• Watch nested tabs on dialogs
• Watch switched order on first vs. add node
Command Line Tips
• Two main ways to create
• Manually
• Picky about spaces, commas, quotes
• Example:
FAILOVERCLUSTERDISKS="Cluster Disk 3" "Cluster Disk 4“
• Run GUI Setup and cancel at end
• Recommendation: do not put passwords (and possibly accounts,
PID) in the files
• Note at execution time
SETUP.EXE /ConfigurationFile=“AddNode.ini” /SQLSVCPASSWORD=“Password”
• New to SQL Server 2008 R2: IACCEPTSQLSERVERLICENSETERMS
Controlling Right for a SQL Admin in a
Cluster
• PowerShell only
• Three variations:
• All
• Read Only
• Nothing
SQL Server 2008 Service Packs and
Failover Clusters
Failover Initiated
SQL2K8
2K8Ins
Ins
SQL
2K8
Ins
SQL
SQL
2K8
Ins
NotUpgraded
Upgraded
Not
Upgraded
Not
Not
Upgraded
SQL 2K8 Ins
Upgraded
3. Add the nodes
1. Remove
half (or
4.back
Remove
nodes
not
remove
2. and
Upgrade
the
more)
of the nodes
upgraded,
upgrade,
other
nodes
except
removed
nodes
from
the possible
and
add
back
the one runningin
the
owners
instance
Removed nodes
cannot be failed over
to until added back in
Summary
• Installation of both Windows and SQL Server is
completely new with their 2008 flavors
• Planning is key
• Many different variations, choose the right
method for you
• Script, script, script
Resources 1
• Pro SQL Server 2008 Failover Clustering (Apress, 2009)
• My blog – updated regularly with new stuff!
• SQL Server 2008 failover clustering whitepaper
• Creating a Clustered DTC with PowerShell
• Server Virtualization Validation Program
• Blog post – Slipstraming SQL Server 2008 + SP
• Blog post – Slipstraming SQL Server 2008 + SP + CU
• Windows Clustering Team Blog
Resources 2
•
KB Articles:
• 956893 “Support policy for Microsoft SQL Server products that are running in
a hardware virtualization environment”
• 897615 Support policy for Microsoft software running in non-Microsoft
hardware virtualization software
• 943984 The Microsoft Support Policy for Windows Server 2008 Failover
Clusters
• 327518 The Microsoft SQL Server support policy for Microsoft Clustering
• 958734 SQL Server 2008 failover clustering rolling patch and service pack
process
Complete the Evaluation Form & Win!
• You could win a Dell Mini Netbook – every day – just for
handing in your completed form! Each session form is
another chance to win!
Pick up your Evaluation Form:
• Within each presentation room
• At the PASS Booth near registration area
Drop off your completed Form:
• Near the exit of each presentation room
• At the PASS Booth near registration area
Sponsored by Dell
Thank you
for attending this session and the
2009 PASS Summit in Seattle