720 lines
8.8 KiB
Markdown
720 lines
8.8 KiB
Markdown
# SQL Server Failover Cluster Instance (FCI) Migration Runbook
|
|
## SQL Server 2016/2019 → SQL Server 2022 FCI
|
|
|
|
**Document Version:** 1.0
|
|
**Migration Type:** Side-by-Side Cluster Migration
|
|
**Source Cluster:** BISSESQLCLU10_green
|
|
**Target Cluster:** _________________
|
|
**Migration Date:** _________________
|
|
**DBA Lead:** _________________
|
|
**Windows Lead:** _________________
|
|
**Business Owner:** _________________
|
|
|
|
---
|
|
|
|
# 1. Discovery Phase
|
|
|
|
## 1.1 Existing Windows Cluster
|
|
|
|
### Cluster Inventory
|
|
|
|
- [ ] Cluster Name
|
|
- [ ] Cluster Nodes
|
|
- [ ] Cluster Networks
|
|
- [ ] Cluster Quorum Type
|
|
- [ ] Witness Configuration
|
|
- [ ] Cluster Functional Level
|
|
- [ ] Patching Level
|
|
|
|
### Cluster Validation
|
|
|
|
```powershell
|
|
Get-Cluster
|
|
Get-ClusterNode
|
|
Get-ClusterNetwork
|
|
Get-ClusterQuorum
|
|
```
|
|
|
|
- [ ] Validation report collected
|
|
- [ ] No unresolved cluster issues
|
|
- [ ] Failover history reviewed
|
|
|
|
---
|
|
|
|
# 2. SQL Server Inventory
|
|
|
|
## SQL Instance
|
|
|
|
```sql
|
|
SELECT @@VERSION;
|
|
```
|
|
|
|
- [ ] SQL Version
|
|
- [ ] SQL Edition
|
|
- [ ] SQL CU/SP Level
|
|
- [ ] Instance Name
|
|
- [ ] Cluster Name
|
|
- [ ] Collation
|
|
- [ ] Authentication Mode
|
|
- [ ] Max Server Memory
|
|
- [ ] MaxDOP
|
|
- [ ] Cost Threshold
|
|
- [ ] TempDB Configuration
|
|
- [ ] Startup Parameters
|
|
- [ ] Trace Flags
|
|
|
|
---
|
|
|
|
# 3. Database Inventory
|
|
|
|
For each database:
|
|
|
|
- [ ] Name
|
|
- [ ] Data Size
|
|
- [ ] Log Size
|
|
- [ ] Recovery Model
|
|
- [ ] Compatibility Level
|
|
- [ ] Owner
|
|
- [ ] TDE Enabled
|
|
- [ ] CDC Enabled
|
|
- [ ] Replication
|
|
- [ ] Service Broker
|
|
- [ ] FullText
|
|
- [ ] CLR
|
|
- [ ] FILESTREAM
|
|
- [ ] Query Store
|
|
|
|
---
|
|
|
|
# 4. Instance Objects Inventory
|
|
|
|
## Security
|
|
|
|
- [ ] SQL Logins
|
|
- [ ] Windows Logins
|
|
- [ ] Server Roles
|
|
- [ ] Server Permissions
|
|
- [ ] Credentials
|
|
- [ ] Certificates
|
|
- [ ] Endpoints
|
|
|
|
---
|
|
|
|
## SQL Agent
|
|
|
|
- [ ] Jobs
|
|
- [ ] Schedules
|
|
- [ ] Operators
|
|
- [ ] Alerts
|
|
- [ ] Proxies
|
|
|
|
---
|
|
|
|
## Integrations
|
|
|
|
- [ ] Linked Servers
|
|
- [ ] Linked Server Login Mappings
|
|
- [ ] Database Mail
|
|
- [ ] SSIS Packages
|
|
- [ ] Maintenance Plans
|
|
- [ ] PowerShell Scripts
|
|
- [ ] Scheduled Tasks
|
|
- [ ] ODBC DSN
|
|
|
|
---
|
|
|
|
# 5. New Cluster Build
|
|
|
|
## Windows Server
|
|
|
|
### Node 1
|
|
|
|
- [ ] Installed
|
|
- [ ] Patched
|
|
- [ ] Added to domain
|
|
|
|
### Node 2
|
|
|
|
- [ ] Installed
|
|
- [ ] Patched
|
|
- [ ] Added to domain
|
|
|
|
### Common Configuration
|
|
|
|
- [ ] Same patch level
|
|
- [ ] Same time zone
|
|
- [ ] Antivirus exclusions
|
|
- [ ] Firewall rules
|
|
- [ ] Monitoring agent installed
|
|
|
|
---
|
|
|
|
# 6. Storage Preparation
|
|
|
|
## Shared Storage
|
|
|
|
### Data
|
|
|
|
- [ ] Presented to all nodes
|
|
|
|
### Logs
|
|
|
|
- [ ] Presented to all nodes
|
|
|
|
### TempDB
|
|
|
|
- [ ] Presented to all nodes
|
|
|
|
### Backups
|
|
|
|
- [ ] Presented to all nodes
|
|
|
|
### Quorum
|
|
|
|
- [ ] Configured
|
|
|
|
---
|
|
|
|
## Storage Validation
|
|
|
|
- [ ] MPIO configured
|
|
- [ ] Latency tested
|
|
- [ ] Throughput tested
|
|
- [ ] NTFS 64K Allocation Unit
|
|
|
|
---
|
|
|
|
# 7. Build Windows Cluster
|
|
|
|
## Install Features
|
|
|
|
```powershell
|
|
Install-WindowsFeature Failover-Clustering -IncludeManagementTools
|
|
```
|
|
|
|
- [ ] Installed on Node1
|
|
- [ ] Installed on Node2
|
|
|
|
---
|
|
|
|
## Cluster Validation
|
|
|
|
```powershell
|
|
Test-Cluster
|
|
```
|
|
|
|
- [ ] Network validation passed
|
|
- [ ] Storage validation passed
|
|
- [ ] System validation passed
|
|
|
|
---
|
|
|
|
## Create Cluster
|
|
|
|
```powershell
|
|
New-Cluster
|
|
```
|
|
|
|
- [ ] Cluster created
|
|
- [ ] Cluster name online
|
|
- [ ] Cluster IP online
|
|
- [ ] Witness configured
|
|
|
|
---
|
|
|
|
# 8. Install SQL Server 2022 FCI
|
|
|
|
## Node 1
|
|
|
|
### Installation
|
|
|
|
```text
|
|
New SQL Server Failover Cluster Installation
|
|
```
|
|
|
|
- [ ] SQL Engine installed
|
|
- [ ] SQL Agent installed
|
|
- [ ] FullText installed
|
|
- [ ] Instance name configured
|
|
- [ ] Virtual SQL Name configured
|
|
- [ ] SQL IP configured
|
|
|
|
---
|
|
|
|
## Node 2
|
|
|
|
### Add Node
|
|
|
|
```text
|
|
Add Node to Existing SQL Server Failover Cluster
|
|
```
|
|
|
|
- [ ] Node added successfully
|
|
- [ ] SQL Services online
|
|
|
|
---
|
|
|
|
## Patch SQL
|
|
|
|
- [ ] Latest approved CU installed
|
|
- [ ] Identical build on both nodes
|
|
|
|
---
|
|
|
|
# 9. Cluster Validation
|
|
|
|
## SQL Resource
|
|
|
|
```powershell
|
|
Get-ClusterGroup
|
|
```
|
|
|
|
- [ ] SQL Group Online
|
|
|
|
### Failover Test
|
|
|
|
Node1 → Node2
|
|
|
|
```powershell
|
|
Move-ClusterGroup
|
|
```
|
|
|
|
- [ ] Successful
|
|
|
|
Node2 → Node1
|
|
|
|
- [ ] Successful
|
|
|
|
### SQL Validation
|
|
|
|
```sql
|
|
SELECT
|
|
SERVERPROPERTY('ComputerNamePhysicalNetBIOS');
|
|
```
|
|
|
|
- [ ] Correct owner node reported
|
|
|
|
---
|
|
|
|
# 10. Migrate Instance Objects
|
|
|
|
## Logins
|
|
|
|
- [ ] SQL Logins
|
|
- [ ] SID preserved
|
|
- [ ] Roles preserved
|
|
- [ ] Permissions preserved
|
|
|
|
---
|
|
|
|
## Linked Servers
|
|
|
|
- [ ] Linked Servers migrated
|
|
- [ ] Passwords restored
|
|
- [ ] Connectivity tested
|
|
|
|
---
|
|
|
|
## SQL Agent
|
|
|
|
- [ ] Jobs imported
|
|
- [ ] Schedules imported
|
|
- [ ] Operators imported
|
|
- [ ] Alerts imported
|
|
- [ ] Proxies imported
|
|
|
|
**Do not enable jobs yet.**
|
|
|
|
---
|
|
|
|
## Database Mail
|
|
|
|
- [ ] Accounts migrated
|
|
- [ ] Profiles migrated
|
|
- [ ] Test mail successful
|
|
|
|
---
|
|
|
|
# 11. Restore Testing
|
|
|
|
## Backup
|
|
|
|
```sql
|
|
BACKUP DATABASE
|
|
```
|
|
|
|
- [ ] Completed
|
|
|
|
---
|
|
|
|
## Verify
|
|
|
|
```sql
|
|
RESTORE VERIFYONLY
|
|
```
|
|
|
|
- [ ] Successful
|
|
|
|
---
|
|
|
|
## Restore
|
|
|
|
```sql
|
|
RESTORE DATABASE
|
|
```
|
|
|
|
- [ ] Successful
|
|
|
|
---
|
|
|
|
## CHECKDB
|
|
|
|
```sql
|
|
DBCC CHECKDB
|
|
```
|
|
|
|
- [ ] Successful
|
|
|
|
---
|
|
|
|
# 12. Cutover Readiness
|
|
|
|
## Frozen Changes
|
|
|
|
- [ ] No schema changes
|
|
- [ ] No new jobs
|
|
- [ ] No new logins
|
|
- [ ] No application releases
|
|
|
|
---
|
|
|
|
## Stakeholders
|
|
|
|
- [ ] Business Owner ready
|
|
- [ ] Application Owner ready
|
|
- [ ] DBA ready
|
|
- [ ] Windows Team ready
|
|
|
|
---
|
|
|
|
## Rollback Prepared
|
|
|
|
- [ ] Rollback approved
|
|
- [ ] Source cluster untouched
|
|
- [ ] Backups validated
|
|
|
|
---
|
|
|
|
# 13. Production Cutover
|
|
|
|
## Start Change
|
|
|
|
- [ ] Open bridge call
|
|
- [ ] Notify stakeholders
|
|
|
|
---
|
|
|
|
## Source System
|
|
|
|
### Disable Jobs
|
|
|
|
- [ ] Disable SQL Agent jobs
|
|
|
|
### Stop Applications
|
|
|
|
- [ ] Stop application services
|
|
|
|
### Stop ETL
|
|
|
|
- [ ] Stop ETL jobs
|
|
|
|
---
|
|
|
|
## Final Backup
|
|
|
|
### Full
|
|
|
|
```sql
|
|
BACKUP DATABASE
|
|
```
|
|
|
|
### Log
|
|
|
|
```sql
|
|
BACKUP LOG
|
|
```
|
|
|
|
### Verify
|
|
|
|
```sql
|
|
RESTORE VERIFYONLY
|
|
```
|
|
|
|
---
|
|
|
|
# 14. Restore Production Databases
|
|
|
|
### Full Backup
|
|
|
|
```sql
|
|
RESTORE DATABASE
|
|
WITH NORECOVERY
|
|
```
|
|
|
|
### Log Backups
|
|
|
|
```sql
|
|
RESTORE LOG
|
|
WITH NORECOVERY
|
|
```
|
|
|
|
### Recovery
|
|
|
|
```sql
|
|
RESTORE DATABASE
|
|
WITH RECOVERY
|
|
```
|
|
|
|
---
|
|
|
|
# 15. Post-Restore Configuration
|
|
|
|
## Security
|
|
|
|
- [ ] Logins verified
|
|
- [ ] Credentials verified
|
|
- [ ] Certificates installed
|
|
|
|
---
|
|
|
|
## Agent
|
|
|
|
- [ ] Jobs enabled
|
|
- [ ] Operators enabled
|
|
- [ ] Alerts enabled
|
|
|
|
---
|
|
|
|
## Integrations
|
|
|
|
- [ ] Linked Servers tested
|
|
- [ ] Database Mail tested
|
|
- [ ] SSIS tested
|
|
|
|
---
|
|
|
|
# 16. Application Cutover
|
|
|
|
## Connection Strings
|
|
|
|
- [ ] Updated
|
|
|
|
OR
|
|
|
|
## DNS Alias
|
|
|
|
- [ ] Updated
|
|
|
|
OR
|
|
|
|
## SQL Alias
|
|
|
|
- [ ] Updated
|
|
|
|
---
|
|
|
|
## Validation
|
|
|
|
- [ ] Login works
|
|
- [ ] Read operations work
|
|
- [ ] Write operations work
|
|
|
|
---
|
|
|
|
# 17. Smoke Testing
|
|
|
|
## Database Checks
|
|
|
|
```sql
|
|
SELECT
|
|
name,
|
|
state_desc
|
|
FROM sys.databases
|
|
```
|
|
|
|
- [ ] All databases ONLINE
|
|
|
|
---
|
|
|
|
## SQL Agent
|
|
|
|
- [ ] Agent running
|
|
|
|
---
|
|
|
|
## Backups
|
|
|
|
- [ ] Backup path reachable
|
|
|
|
---
|
|
|
|
## Database Mail
|
|
|
|
- [ ] Test email successful
|
|
|
|
---
|
|
|
|
# 18. Failover Validation
|
|
|
|
## Manual Failover
|
|
|
|
Node1 → Node2
|
|
|
|
```powershell
|
|
Move-ClusterGroup
|
|
```
|
|
|
|
- [ ] Successful
|
|
|
|
### Validate
|
|
|
|
- [ ] Applications reconnect
|
|
- [ ] SQL accessible
|
|
- [ ] Jobs operational
|
|
|
|
---
|
|
|
|
## Manual Failback
|
|
|
|
Node2 → Node1
|
|
|
|
- [ ] Successful
|
|
|
|
### Validate
|
|
|
|
- [ ] Applications reconnect
|
|
- [ ] SQL accessible
|
|
- [ ] Jobs operational
|
|
|
|
---
|
|
|
|
# 19. Rollback
|
|
|
|
## Rollback Criteria
|
|
|
|
- [ ] Critical application failure
|
|
- [ ] Data inconsistency
|
|
- [ ] Login failures
|
|
- [ ] Cluster instability
|
|
- [ ] Critical ETL failure
|
|
- [ ] Unacceptable performance
|
|
|
|
---
|
|
|
|
## Rollback Actions
|
|
|
|
### Stop Target
|
|
|
|
- [ ] Stop Applications
|
|
- [ ] Disable Jobs
|
|
|
|
### Revert Connections
|
|
|
|
- [ ] Restore source connection strings
|
|
- [ ] Restore source DNS
|
|
|
|
### Reactivate Source
|
|
|
|
- [ ] Enable source jobs
|
|
- [ ] Enable source applications
|
|
|
|
### Validation
|
|
|
|
- [ ] Login works
|
|
- [ ] Read works
|
|
- [ ] Write works
|
|
|
|
---
|
|
|
|
# 20. Post Migration Validation
|
|
|
|
## First 24 Hours
|
|
|
|
- [ ] SQL Error Logs
|
|
- [ ] Windows Event Logs
|
|
- [ ] Cluster Logs
|
|
- [ ] Backup Jobs
|
|
- [ ] Application Logs
|
|
- [ ] Monitoring Alerts
|
|
|
|
---
|
|
|
|
## First 7 Days
|
|
|
|
- [ ] Database Growth
|
|
- [ ] CPU Usage
|
|
- [ ] Memory Usage
|
|
- [ ] Wait Statistics
|
|
- [ ] Blocking Events
|
|
- [ ] Backup Success
|
|
|
|
---
|
|
|
|
## Decommission Source Cluster
|
|
|
|
Only after sign-off.
|
|
|
|
- [ ] Business Approval
|
|
- [ ] Application Approval
|
|
- [ ] DBA Approval
|
|
- [ ] Backup Validation
|
|
- [ ] Monitoring Validation
|
|
|
|
### Final Tasks
|
|
|
|
- [ ] Update CMDB
|
|
- [ ] Update Documentation
|
|
- [ ] Archive Backup
|
|
- [ ] Disable Source SQL
|
|
- [ ] Remove Source Cluster
|
|
|
|
---
|
|
|
|
# FCI DBA Killer Checklist
|
|
|
|
Najczęściej zapominane elementy:
|
|
|
|
- [ ] SQL Agent Schedules
|
|
- [ ] SQL Agent Proxies
|
|
- [ ] Linked Server Passwords
|
|
- [ ] TDE Certificates
|
|
- [ ] Service Accounts
|
|
- [ ] SPN Registration
|
|
- [ ] Kerberos Delegation
|
|
- [ ] ODBC DSN
|
|
- [ ] Shared Folders
|
|
- [ ] Scheduled Tasks
|
|
- [ ] SSIS Packages
|
|
- [ ] Database Mail
|
|
- [ ] Antivirus Exclusions
|
|
- [ ] Backup Jobs
|
|
- [ ] Monitoring Configuration
|
|
- [ ] TempDB Layout
|
|
- [ ] Trace Flags
|
|
- [ ] DNS Aliases
|
|
- [ ] Cluster Quorum
|
|
- [ ] Failover Testing
|
|
|
|
---
|
|
|
|
# Migration Success Criteria
|
|
|
|
- [ ] Databases ONLINE
|
|
- [ ] Applications functional
|
|
- [ ] SQL Agent functional
|
|
- [ ] Backups functional
|
|
- [ ] Monitoring functional
|
|
- [ ] Failover tested
|
|
- [ ] Failback tested
|
|
- [ ] Performance acceptable
|
|
- [ ] Business sign-off received |