SAP On Azure : High-Availability Setup of SAP Content Server 7.53 with MaxDB in Windows Environment

This document provides highly available (HA) setup of SAP Content Server 7.53 and MaxDB in Windows environment in Microsoft Azure. It uses Windows Fail Safe Cluster (WFSC) solution and SIOS datakeeper for deploying shared disk for HA setup.

By setting up HA solution, we can protect SAP Content server & MaxDB against Infrastructure & VM failure and removes Single Point of Failure (SPOF) for the environment. This document can be used as reference for deployment of HA environment and not intended to cover other aspects of system design like infra, network, security, and performance.

Reference architecture for SAP Content Server & MaxDB in Microsoft Azure is following. Its connected with ECC OR S/4HANA environment in Azure.

Following are the details of the reference setup:

Hostname Description OS Version DB Version SAP Version
azwincntsv1 Content Server + MaxDB Primary Windows 2016 MaxDB 7.9 Content Server 7.53
azwincntsv2 Content Server + MaxDB Secondary Windows 2016 MaxDB 7.9 Content Server 7.53
cs1-cont-sdb Virtual hostname

The setup can be extended for Disaster Recovery (DR) in paired Azure region by setting up third VM for SAP Content Server + MaxDB instance, replication of data & log disk using SIOS datakeeper(async) and including the VM in the WFSC.

SAP MaxDB, liveCache, and Content Server deployment on Azure VMs

SAP Note 2786364 – SAP Content Server and Cache Server 7.5 (and higher)

SAP Note 2319006 – Database service automatic startup fails on Windows Server

SAP Note 2255600 – MSCS: Installation of SAP Content Server Database in MSCS Environment

High level Installation process for HA SAP Content Server with MaxDB are following :

  • Read the required Installation Guide, SAP Notes, SAP on Azure docs and download the installation media.
  • Provision the VM and attach the Disks for DATA & LOG volumes
  • Install the Content Server and MaxDB on both the VMs. Choose the local drive for content server and replicated drives for MaxDB installation.
  • Deploy Internal Loadbalancer and define virtual IP.
  • Setup the Windows Cluster for the VMs and attach the cloud witness
  • Install SIOS Datakeeper and Configure Disk Replication
  • Configure MaxDB Cluster Resources
  • Configure Content Repositories in ECC OR S/4HANA for HA based Content Server.
  • Deploy 2 VM in an Availability Set and Choose Operating System as Windows Server.
  • Include 2 data disk on each VM. Disk 1 will be used for Data Drive and Disk 2 will be used for Log.
  • Join the VMs to the Domain.
  • Define Page File in Temp Disk (D Drive).
  • Necessary ports are open in Windows firewall.

The following items are prefixed with either [A] – applicable to all nodes, [1] – only applicable to node 1 or [2] – only applicable to node 2.

[A] Install SAP Content Server and MaxDB

  • Install SAP Content Server 7.53 by starting the latest version of SWPM
  • Choose Content Server SID. Destination drive as local drive (like C:\)

          In the Master Password screen, its recommended to have password which is upto 9 char in  length.

          In the user details screen, its recommended to create the user in domain.

Autostart = 1

[A] Intall MaxDB

c:\sapdb\programs\pgm>dbmcli -d SDB -u superdba,<password> db_offline c:\sapdb\programs\pgm>dbmcli -d SDB -u superdba,<password> db_state

Deploy Azure Internal Load Balancer

We need define Virtual IP to connect (from ECC OR S/4 HANA) to highly available SAP content server and MaxDB in Internal load balancer(standard or Basic). We have used standard load balancer in this setup.

  • Create the front-end IP
  • Create the backend pools
  • Create the Probe Port. Used probe port as 62300.
  • Create Load balancing rules. Make sure Floating IP is enabled and Idle timeout is 30 minutes.

As we are using standard load balancer, HA port is selected in above screen. In case Basic load balancer is used, loadbalancing rule needs to be defined for all the ports used by SAP content server, MaxDB and Windows(5985, 445).

Windows Cluster Setup

  • Create A record for Cluster IPs in AD/DNS.
  • [A] In the Add Role and Features Wizard, add failover clustering to both cluster nodes.
  • Set up the failover cluster by using Failover Cluster Manager. In Failover Cluster Manager, select Create Cluster, and then add only the name of the first cluster (node A). Do not add the second node yet; you add the second node in a later step.
  • Enter the network name (virtual host name) of the cluster.
  • Change the cluster IP and start the services.

  • Change below parameters thresholds so they adapt failover detection to conditions in Azure.

We can see further details about these setting in the link.

Install and Configure SIOS Datakeeper

  • [A] Add Microsoft .NET Framework 3.5
  • [A] Use the dism.exe command-line tool. For this type of installation, you need to access the SxS directory on the Windows installation media. At an elevated command prompt, enter this command:
Dism /online /enable-feature /featurename:NetFx3 /All /Source:installation_media_drive:\sources\sxs /LimitAccess

  • [A] Install SIOS Datakeeper cluster
  • [1] Configure SIOS Datakeeper

Configure Cluster Resource for MaxDB

Below steps are referred from SAP Note 2255600 to configure the MaxDB cluster resources.

  • Create a new folder M:\sapdb\SDB\db\nocluster and move the following original binary files from M:\sapdb\SDB\db\pgm.

dbmsrv.exe, serv.exe, service.exe, strt.exe, stop.exe

  • Copy the *_clu.exe binaries from the M:\sapdb\SDB\db\cluster folder into the M:\sapdb\SDB\db\pgm folder, rename the files removing ‘_clu‘ extension.
  • Installation of the MaxDB cluster management software
    • Next the MaxDB cluster libraries and MaxDB cluster manager executable must be installed. Copy it from MaxDB cluster directory into Windows cluster system directory

Copy files from M:\sapdb\SDB\db\cluster to C:\Windows\Cluster. Also copy these files to Secondary VM location C:\Windows\Cluster.

  • Run the following command
C:\Windows\Cluster>SAPDBMSCSMan.exe -C
  • Create the MaxDB Cluster Resources and cluster group
C:\Windows\Cluster>SAPDBMSCSMan.exe -B "Cluster Network 1,xx.xx.xx.15,,DataKeeper Volume M,7200"

Notes :

    1. IP will be the Loadbalancer frontend IP. In this case its mentioned as xx.xx.xx.15
    2. Network Mask can be found in IPCONFIG command. In this case its 255.255.255,139
    3. Cluster Network Name can be found in the below screen shot. In this case its ‘Cluster Network 1’.
    4. Disk Resource can be found in Storage View of the Cluster. Use only 1 of the Disk.
    5. Port Name can be found using the following command
C:\sapdb\programs\pgm>dbmcli inst_enum m:\sapdb\SDB\db OK VERSION    = INSTROOT   = M:\sapdb\SDB\db SYSTEM     = NO ISOLATED   = YES XServerState = Running SSLPortNoOrService = 7202 NIPortNoOrService = 7201 PortNoOrService = 7200 XserverAutostart = yes DataPath   = M:\sapdb\SDB\data Name       = SDB
  • The database resource must be added to the MaxDB group
C:\Windows\Cluster>SAPDBMSCSMan.exe -a SDB,MaxDB
  • If there are further storages used by the database they should be added
C:\Windows\Cluster>SAPDBMSCSMan -m "DataKeeper Volume N,MaxDB"
  • Set the resource dependency

Right click on the SDB resource, select properties.

Go to the Dependencies tabulator and make the resource SDB dependent on other resources in this group.

  • Find the Probe Port Defined for the cluster
Get-ClusterResource "MaxDB IP-Address" | Get-ClusterParameter

It will show that Probe port is still ‘0’ (not configured)

  • Update the probe port of the Cluster

Run the below script to update the Probe port. Adapt the parameter values if you have used different Names & ports.

$ProbePort = 62300   # ProbePort of the Azure internal load balancer Clear-Host $SAPClusterRoleName = "MaxDB" $SAPIPresourceName = "MaxDB IP-Address" $SAPIPResourceClusterParameters =  Get-ClusterResource $SAPIPresourceName | Get-ClusterParameter $IPAddress = ($SAPIPResourceClusterParameters | Where-Object {$_.Name -eq "Address" }).Value $NetworkName = ($SAPIPResourceClusterParameters | Where-Object {$_.Name -eq "Network" }).Value $SubnetMask = ($SAPIPResourceClusterParameters | Where-Object {$_.Name -eq "SubnetMask" }).Value $OverrideAddressMatch = ($SAPIPResourceClusterParameters | Where-Object {$_.Name -eq "OverrideAddressMatch" }).Value $EnableDhcp = ($SAPIPResourceClusterParameters | Where-Object {$_.Name -eq "EnableDhcp" }).Value $OldProbePort = ($SAPIPResourceClusterParameters | Where-Object {$_.Name -eq "ProbePort" }).Value $var = Get-ClusterResource | Where-Object {  $ -eq $SAPIPresourceName  } Write-Host "Current configuration parameters for SAP IP cluster resource '$SAPIPresourceName' are:" -ForegroundColor Cyan Get-ClusterResource -Name $SAPIPresourceName | Get-ClusterParameter Write-Host Write-Host "Current probe port property of the SAP cluster resource '$SAPIPresourceName' is '$OldProbePort'." -ForegroundColor Cyan Write-Host Write-Host "Setting the new probe port property of the SAP cluster resource '$SAPIPresourceName' to '$ProbePort' ..." -ForegroundColor Cyan Write-Host $var | Set-ClusterParameter -Multiple @{"Address"=$IPAddress;"ProbePort"=$ProbePort;"Subnetmask"=$SubnetMask;"Network"=$NetworkName;"OverrideAddressMatch"=$OverrideAddressMatch;"EnableDhcp"=$EnableDhcp} Write-Host $ActivateChanges = Read-Host "Do you want to take restart SAP cluster role '$SAPClusterRoleName', to activate the changes (yes/no)?" if($ActivateChanges -eq "yes"){ Write-Host Write-Host "Activating changes..." -ForegroundColor Cyan Write-Host write-host "Taking SAP cluster IP resource '$SAPIPresourceName' offline ..." -ForegroundColor Cyan Stop-ClusterResource -Name $SAPIPresourceName sleep 5 Write-Host "Starting SAP cluster role '$SAPClusterRoleName' ..." -ForegroundColor Cyan Start-ClusterGroup -Name $SAPClusterRoleName Write-Host "New ProbePort parameter is active." -ForegroundColor Green Write-Host Write-Host "New configuration parameters for SAP IP cluster resource '$SAPIPresourceName':" -ForegroundColor Cyan Write-Host Get-ClusterResource -Name $SAPIPresourceName | Get-ClusterParameter }else { Write-Host "Changes are not activated." }
  • Check the Probe Port Defined for the cluster
Get-ClusterResource "MaxDB IP-Address" | Get-ClusterParameter

It will show that Probe port 62300 (OR the configured probe port)

Configuration of Content Server

  • Access the Web Admin UI of Content Server on both the nodes



This completes the content server configuration.

  • Failover MaxDB cluster from Node1 to Node2 and make sure all resources are started in node2.
  • Check the connection to Content server repository in ECC to content server & DB.
  • Perform Failback from Node2 to Node1 and Repeat the checks.

This completes the HA setup of SAP Content Server 7.53 & MaxDB 7.9 in Windows Cluster using SIOS datakeeper. Similarly, we can setup DR environment in paired Azure region with SIOS Datakeeper replication(in async mode).