SQL Server Failover Cluster Instances
A SQL Server Failover Cluster Instance (FCI) is a single instance of SQL Server that is installed across two or more nodes in a Microsoft Windows Server Failover Cluster (WSFC). An FCI provides instance-level failover capabilities, meaning that if one node fails, SQL Server can automatically start on another node without any data loss or downtime for the application.
Key Concepts
- WSFC: The foundation of SQL Server FCI. It manages the cluster nodes, shared storage, and the quorum model.
- Shared Storage: Data and log files for the SQL Server instance must reside on shared storage that is accessible by all nodes in the cluster. This can be SAN, iSCSI, or Storage Spaces Direct.
- Virtual Network Name (VNN): A virtual name that clients use to connect to the SQL Server FCI, regardless of which node is currently active.
- Virtual IP Address (VIP): A virtual IP address associated with the VNN, allowing clients to reach the SQL Server instance.
- Resource Groups: In WSFC, SQL Server resources (like the VNN, VIP, and SQL Server service) are managed within a cluster resource group.
- Quorum: The mechanism WSFC uses to ensure cluster consistency and prevent split-brain scenarios.
Benefits of Using FCIs
- High Availability: Provides automatic failover for the entire SQL Server instance.
- Disaster Recovery: Can be used as part of a disaster recovery strategy by spanning FCIs across different physical locations (with appropriate network configurations).
- Simplified Management: Clients connect to a single VNN, abstracting the underlying cluster nodes.
- Instance-Level Protection: Protects the entire SQL Server instance, including databases, logins, jobs, and server configurations.
Components of a SQL Server FCI
Component | Description | WSFC Integration |
---|---|---|
SQL Server Instance | The core SQL Server software. | Runs as a cluster resource. |
SQL Server Network Name (Cluster Resource Name) | The virtual name clients use to connect. | A cluster resource. |
SQL Server IP Address (Cluster Resource) | The virtual IP address for the instance. | A cluster resource. |
Shared Disk Resource | Represents the storage accessible by all nodes. | A cluster resource, managing ownership of the disk. |
SQL Server Agent | Manages scheduled jobs and alerts. | Runs as a clustered resource, dependent on the SQL Server instance. |
SQL Server Analysis Services (Optional) | Can be clustered as part of an FCI. | Can be configured as a separate clustered resource. |
Configuration and Management
Configuring a SQL Server FCI involves installing SQL Server in a clustered mode on each node. During installation, you specify the virtual network name, virtual IP address, and the shared storage to be used. Management typically involves using Failover Cluster Manager and SQL Server Management Studio (SSMS).
SQL Server FCIs require shared storage. For scenarios requiring storage redundancy and data mobility without shared storage, consider SQL Server Always On Availability Groups (AGs). AGs offer more granular control over database availability and can span different storage solutions.
Installation Steps Overview:
- Ensure a functional Windows Server Failover Cluster is in place.
- Prepare shared storage accessible by all cluster nodes.
- Install the first node of the SQL Server FCI. Specify the cluster settings, VNN, VIP, and shared storage.
- Install the second (and subsequent) node(s) of the SQL Server FCI, connecting to the existing cluster configuration.
- Configure firewall rules to allow connections to the VNN and VIP.
- Test failover by manually moving the SQL Server resource group between nodes.