Note:
- This tutorial requires access to Oracle Cloud. To sign up for a free account, see Get started with Oracle Cloud Infrastructure Free Tier.
- It uses example values for Oracle Cloud Infrastructure credentials, tenancy, and compartments. When completing your lab, substitute these values with ones specific to your cloud environment.
Deploy Microsoft SQL Server Windows Server Failover Cluster for HA and DR on Oracle Cloud Infrastructure
Introduction
Microsoft SQL Server (MSSQL) enterprise-level database infrastructures rely heavily on high availability (HA) and disaster recovery (DR) capabilities to maintain business continuity and minimize downtime. MSSQL offers several clustering deployment models to help achieve these goals. These models include Always on availability groups and Failover cluster instances.
While each model has its own strengths and use cases, this tutorial will focus specifically on the deployment and configuration of MSSQL failover cluster instance with OCI Block Volumes service using Small Computer Systems Interface (SCSI) Persistent Reservation (PR) feature. For more information about Always On availability groups, see Deploy Microsoft SQL Server Always On Availability Groups for HA and DR on OCI.
Architecture
This tutorial uses the following architecture:
-
Single Region: The deployment comprises a single Oracle Cloud Infrastructure (OCI) region. The deployment could be extended to other OCI regions, but such configurations fall outside the scope of this tutorial.
-
Subnets: With the exception of an OCI Bastion virtual machine (VM), all resources are placed in private regional subnets.
-
OCI Block Volumes:
- Quorum disk: Shared block volume with SCSI PR enabled. This block volume will be used as a cluster quorum disk.
- Data disk: Second shared block volume with SCSI PR enabled. This will be used for storing applications data.
-
SQL Server IPs: Each of the SQL Server VMs needs the following IPs on the primary Virtual Network Interface Cards (VNIC).
- Primary IP: Operating System (OS) access (created automatically upon VM provisioning).
- Secondary IP 1: Windows Server Failover Cluster IP. To be created in this tutorial.
- Secondary IP 2: SQL Server failover cluster IP. To be created in this tutorial.
Objectives
- Deploy and configure failover cluster instances.
Prerequisites
-
Networking:
- 1 * VCN.
- 1 * private subnet.
- 2 * static secondary IPs to assign for failover IPs.
-
Servers:
- 1 * Bastion VM in a public subnet to make sure you can connect to the VMs running on private subnets.
- 1 * Domain controller VM in a private subnet.
- 2 * SQL Server VMs (
sqlnode1
,sqlnode2
) in the same private subnet.
-
Active Directory Domain prerequisites:
- Domain controller features and roles added to the domain controller VM.
- Domain configured by the OS administrator. The domain controller in the present tutorial has the root domain name
example.org
. You can configure the domain with a root domain name of your choice. - You can consult the OCI white paper on Creating Active Directory Domain Services in OCI.
- SQL Server VMs added to the domain.
-
Additional Considerations:
- Storage: WSFC uses an IP from the
169.254.*
address space for internal communication, which overlaps with OCI address space for exposing iSCSI block devices. This will require creating static IP routes to expose iSCSI target portals in each of the SQL Server node VMs. Such configuration is out of the scope of this tutorial. For more information, see Failover Clustering Networking Basics and Fundamentals. - Oracle Cloud Infrastructure Identity and Access Management (OCI IAM) Policies: The tutorial assumes you have configured OCI IAM policies to give you the required permissions to create and manage VCN, private IP, public IP, OCI Block Volumes and launch instances.
- Storage: WSFC uses an IP from the
Task 1: Configure the Failover IP
Windows Server Failover Clustering employs an active/passive clustering model, where a dedicated IP address, known as a failover IP or floating IP, is assigned to the cluster. This failover IP automatically moves from a failed node to an active node, ensuring continuous network connectivity and minimizing downtime. When a node fails, the failover IP is seamlessly transferred to the new active node, allowing clients to maintain access to the cluster resources without interruption.
For more information about configuring the failover IPs on both the Microsoft SQL Server VMs, see Automating Secondary IP address Failover on Windows Server.
Task 2: Create a SQL Server Service Account
SQL Server needs to use a dedicated domain account. In this task, we will create this account. Later in the tutorial, we use this account to configure the SQL Server service on each of the nodes.
-
Log in to the Domain Controller using the domain administrator account and navigate to Active Directory Users and Computers.
-
Expand the domain you configured for this tutorial.
-
Right-click Users and click New User to create a new user.
-
Enter the required information and click Next.
-
Enter the password for this domain account and click Next.
-
Review the details and click Finish.
Task 3: Create Quorum and Shared Disks
We utilize a dedicated shared disk for Quorum purposes in WSFC to prevent split-brain conditions that could arise when multiple nodes in a cluster attempt to assume control simultaneously. This dedicated disk ensures that all nodes in the cluster have a unified view of the cluster’s state, thereby preventing conflicts.
In this task, we will create two distinct shared block volumes with SCSI PR enabled. We enable PR on both volumes as a mechanism to reserve shared resources, ensuring that only authorized nodes can access these resources. SCSI PR is a requirement in a clustering environment, as it prevents data corruption by managing access to shared disks.
-
Quorum Disk: We designate the first shared block volume as the cluster Quorum device. This disk plays a critical role in the functioning of the WSFC by providing a common resource that all nodes can access and agree upon. This Quorum disk is used solely for cluster operation purposes, as it helps us determine the state of the cluster and make decisions regarding failover and the assumption of cluster resource ownership.
-
Data Disk: We allocate the second shared block volume for applications to store data. We utilize this disk to host application data, such as databases, file shares, or any other type of data that the clustered application requires. By using a shared disk for data storage, we ensure high availability of the data, as it can be accessed by any node in the cluster that assumes ownership of the application or service.
By creating these two separate shared block volumes with distinct roles and enabling SCSI PR on both, we ensure that our WSFC is properly configured to maintain high availability and redundancy, both for the critical Quorum function and for the data storage needs of the applications running within the cluster.
To create OCI Block Volumes with SCSI PR enabled, follow the steps:
-
Log in to the OCI Console, navigate to Storage, Block Volumes page and click Create Block Volume.
-
Adjust Volume size and performance and select Enables persistent reservations for iSCSI volume attachments to enable SCSI PR for the volume.
-
Attach the volume to SQL Server VMs one by one. Since these volumes have SCSI PR enabled, these volumes can only be attached in shared read-write/read-only mode. For this setup, we will attach the volumes in shared read-write mode. Select Use Oracle Cloud Agent to automatically connect to iSCSI-attached volumes and click Attach.
-
Repeat steps 1 to 3 for creating and attaching both Quorum and Data disks.
Task 4: Configure a Windows Server Failover Cluster
In this task, we will:
-
Add WSFC roles to the SQL Server VMs.
-
Create and configure a cluster using the secondary IPs created in Task 1.
Task 4.1: Add WSFC Roles to the Windows Server VMs
-
Log in to SQL Server node 1 VM using the domain administrator account, open Server Manager and under Dashboard, click Add roles and features.
-
Review the Before You Begin section and click Next.
-
Select Role-based or feature-based installation and click Next.
-
In Select destination server, select server from the server pool and verify
sqlnode1.example.org
is selected and click Next to proceed. -
We will not be adding any Server Roles, so click Next to proceed.
-
In Features, select Failover Clustering. When you do, a window will appear, then click Add Features.
-
In Confirm installation selection, review the details and click Install to confirm the installation and when the installation is finished, close the wizard.
-
Repeat steps 1 to 7 for installing failover clustering tools on the second SQL Server Node.
Task 4.2: Create a Cluster
-
Log in to the Windows Server node 1 VM using the domain administrator account and open the Failover Cluster Manager. You will find there are no clusters running.
-
Right-click on Failover Cluster Manager and select Create Cluster…, this will open a Create Cluster Wizard.
-
Once the Create Cluster Wizard opens, click Next to proceed.
-
Click Browse and select
sqlnode1.example.org
andsqlnode2.example.org
. -
Select Yes, When I click Next, run the configuration tests, and then return to the process of creating the cluster and click Next.
-
Select Run all tests and click Next.
-
In the Confirmation window, click Next and wait till all tests are finished and click Finish. OCI supports SCSI PR now and you can see the test Validate SCSI-3 Persistent reservation passed.
-
Enter Cluster Name and consider the NetBIOS constraints. Click Next.
-
Confirm the cluster before creating and click Next.
-
When the cluster is successfully created, click Finish.
-
Open the Failover Cluster Manager and you will be able to see the newly created cluster.
-
Notice that the status of the cluster is Offline in the Cluster Core Resources section. Expand the resources and find the cluster IP addresses not yet configured. Right-click the IP address with Failed status and then click Properties.
-
In the General tab, specify the Static IP Address configured for this node in Task 1 and click Apply.
-
Right-click the configured IP address and click Bring Online.
-
With the cluster creation complete, we will now expand the cluster and navigate to the Storage section, where we will select Disks to confirm that both shared block volumes (the designated quorum disk and the data disk) are properly listed and recognized by the cluster.
Task 5: Install and Configure SQL Server
In this task, we will cover new SQL Server failover cluster installation.
-
Run
setup.exe
from downloaded MSSQL software bundle. -
Select Installation.
-
Select New SQL Server failover cluster installation.
-
Enter Product Key and click Next.
-
Accept License Terms and click Next.
-
Under Microsoft Update, click Next. Installer will scan for software updates, download and will start the installation process.
-
It will Install Failover Cluster Rules. Click Next.
-
Under Feature Selection, select Database Engine Services and click Next.
-
In Instance Configuration, enter a name for SQL Server Network Name, select Default Instance or Named Instance and click Next.
-
In Cluster Resource Group, click Next.
-
In Cluster Disk Selection, select Cluster Disk 2 and click Next.
-
In Cluster Network Configuration, assign IPv4 address and click Next.
-
In Server Configuration, enter SQL server Service Account Name and Password created in Task 2 and click Next.
-
In Database Engine Configuration, configure Authentication mode and other settings and click Next.
-
In Ready to Install, click Install.
-
You will see the installation progress. Click Close.
-
Go to Failover Cluster Manager, expand the cluster and navigate to the Storage section and verify disks. You will see the second disk is assigned to SQL Server as shown in the following image.
-
Go to Failover Cluster Manager, expand the cluster, navigate to the Roles section. You can see the SQL Server cluster.
-
In SQL Server Management Studio, we can now connect to the database. Your deployment is now ready and is set up to be highly available and fault tolerant.
Next Steps
In this tutorial, we have walked you through the process of setting up a WSFC cluster with MSSQL using SCSI PR feature of OCI Block Volumes service. By following this tutorial, you should now have a fully functional WSFC cluster with MSSQL using SCSI PR. Remember to test and validate your cluster regularly to ensure high availability and minimize downtime.
Acknowledgments
- Author - Chakri Nelluri (OCI Block Storage Product Management)
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.
Deploy Microsoft SQL Server Windows Server Failover Cluster for HA and DR on Oracle Cloud Infrastructure
G31662-02
Copyright ©2025, Oracle and/or its affiliates.