SQL Server Deployment for High Availability
-
Deploy the SAP NetWeaver ASCS instance. For instructions, see the SAP NetWeaver on AWS Deployment and Operations Guide for Windows .
-
Create two EC2 instances for Microsoft SQL server, one in each Availability Zone. See the Windows EC2 instances deployment section for steps.
-
Assign two secondary IP addresses to each instance from the same subnet CIDR in which they are installed:
-
Use one address for Windows Server Failover Cluster (WSFC).
-
Use the second address for the Availability Group listener.
You can assign IP addresses through the AWS Management Console, AWS Command Line Interface (AWS CLI), or AWS Tools for Windows PowerShell. For detailed working instructions, see Multiple IP Addresses.
For example, in the screenshot that follows, 10.100.4.53 is the primary private IP address of the EC2 instance. It has been allocated two secondary private addresses: 10.100.4.54 and 10.100.4.55.
-
-
Domain join EC2 instances created in Step 1. If you are using AWS Managed Microsoft AD, see AWS Directory Service documentation for detailed steps.
-
Log in to the EC2 instance as admin, open PowerShell, and execute the following command to install the Windows Failover Clustering feature.
Install-WindowsFeature -Name Failover-Clustering -restart -IncludeAllSubFeature
Note
This command may force your EC2 instance to restart. Make sure you execute the command on both EC2 instances.
-
Log in as domain admin into one of the EC2 instance and execute the following command to create the Windows Server Failover Cluster. Make sure to replace the placeholders before executing the command.
New-Cluster -Name
<ClusterName>
-Node<Node1>
,<Node2>
-NoStorageFor example:
New-Cluster -Name SAPSQLCluster -Node primarysql,secondarysql -NoStorage
-
Install SQL Server on both EC2 instances. For instructions, see the SAP installation guide
. Install the database instance on the primary node. Follow SAP installation guide to install Database instance on primary node. Make sure you perform domain installations and choose Domain of Current User or Different Domain as appropriate during parameter selection.
-
Create operating system users on secondary instance.
-
Start sapinst, and in the Available Options pane, navigate to Generic Options > MS SQL Server > Preparations > Operating System Users and Groups.
Note
The navigation path can vary depending on the version of SWPM you are using.
-
Create users and groups for this instance, as appropriate.
Note
You do not need to create users on the primary instance because the database instance was installed on the primary node operating system.
-
-
Install SAP Host agent on secondary instance with SWPM.
-
Create a SQL Server Always On availability group. See the Microsoft documentation
for SQL Always On availability group installation instructions. -
Adjust the SAP profile files for parameters per the following example. Make sure to replace the
<availabilitygroup listener>
placeholder with appropriate the value for your setup. For details, refer to SAP Note 1772688 - SQL Server Always On and SAP applications. dbs/mss/server =
<availabilitygroup listener>
;MultiSubnetFailover=yesSAPDBHOST =
<availabilitygroup listener>
-
Perform failover and failback of SQL Server to validate it is working correctly.
-
Continue with installation of primary application server (PAS) and additional application server (AAS) following the instructions in SAP installation guides
.