This blog describes how to change the cluster Resource Type of a resource “SAP <SID> <NR> Service” from Generic Service to SAP Service on Windows Server 2008. The SAP Service resource is necessary for the RKS – The Rolling Kernel Switch functionality.
As of Windows Server 2008 R2, Microsoft provides PowerShell cmdlets which allow to script this task. If you are running Windows Server 2008 R2 or higher, use the PowerShell script Switch-SAPServiceResourceType.ps1. This script is part of the ntclust.sar package.
You can also use the procedures described here on higher Windows versions, to add or remove SAP cluster resources in general. The screenshots are taken from a Windows 2008 Failover Cluster. They’re similar on higher Windows versions.
In this blog, I am using the placeholders <SID> and <NR>, which need to be replaced with the SAP System Identifier (<SID>) and Number (<NR>) of your configuration. The screenshots in this document show a system with <SID>= TXT and <NR>= 00.
The SAP resource type monitoring DLL (saprc.dll) for Windows Failover Clusters has been updated as described in SAP Note 1596496.
Open Failover Cluster Manager.
- Open Cluster → Services and Applications
If you have configured multiple SAP Groups (also called Services and Applications as of Windows Server 2008) in your cluster, you need to perform below described actions on all SAP cluster Groups.
- Select the SAP <SID> Services and Applications (cluster group).
Your clustered SAP System may contain up to two SAP-Instances (ASCS and SCS) in case you are running a double stack configuration. If your SAP system has been configured with two clustered instances you need to perform all below described actions on both instances.
Take the “SAP <SID> <NR>” Failover Cluster Resources Offline
- Right click on SAP <SID> <NR> Service.
- Click “Take this resource offline”.
Because of the defined dependencies the “SAP <SID> <NR> Instance” will be automatically taken offline before “SAP <SID> <NR> Service” is taken offline.
Check the Dependencies and Possible Owners of the SAP Instance and Generic Service Resource
Check dependency configuration of the SAP Instance Resource
- Right Click on SAP <SID> <NR> Instance.
- Choose “Properties” >> Dependencies.
In the standard configuration there is only one dependency defined:
- Switch to the Advanced Policies tab.
Note the Possible Owners, you will need to specify them later.
If your cluster has more than two Cluster Nodes, there are only two possible Owners allowed for the SAP Instance Resource Type. If you have specified more Cluster nodes the enqueue replication mechanism will not work at all!
Check Dependency of the Service Resource
- Right Click on SAP <SID> <NR> Service.
- Choose “Properties” >> Dependencies
There should only be ONE dependency entry for the “SAP <SID> <NR> Service”
If either the Instance Resource or the Service Resource does show more than one or different dependencies, your system does not match the standard SAP on Windows Failover Clusters configuration.
Please consult the person/organization who installed the system before proceeding with this configuration change.
Delete the Instance and Service Resources
Delete the SAP <SID> <NR> Instance Resource
We will now delete the SAP <SID> <NT> Instance Resource to delete private resource properties which are no longer needed. The Resource will be created again later.
- Right-click on SAP <SID> <NR> Instance.
- Click “Delete”.
Delete the SAP <SID> <NR> Service cluster resource
In order to change the resource type of the SAP <SID> <NR> Service resource from Generic Service to SAP Service,we need to delete the current resource and create a new one using SAP Service as resource type.
- Right-click on SAP <SID> <NR> Service.
- Click “Delete”.
Create “SAP <SID> <NR> Service” resource as SAP Service resource type
- Right click on SAP <SID> Services and Applications (Cluster Groups)
- Add a Resource >> More Resources >>Add SAP Service.
(The number/letter in front of the service type may differ, depending on the products installed on your computer).The resource is added with initial private properties using a generic name:
Modify the properties on the newly created cluster resource
- Right-click on the new resource and edit the properties.
- Switch to the General tab and change the resource name.
- Go to the Dependencies tab and add a dependency to the SAP <SID> Fileserver resource.
- Open the Policies tab and specify “0” for Maximum restarts in the specified period.
It is very important that you specify “0”. If you specify a different number than “0” your restarted A/SCS Instance will not copy the mirrored enqeue table and you will lose the SAP system locks during a restart of the instance!
- In the Properties tab, specify the service name SAP<SID>_<NR> the resource is controlling.
- Click OK to change the properties of the SAP <SID> <NR> Service cluster resource.
Create SAP <SID> <NR> Instance Resource
- Right click on SAP <SID> Services and Applications (Cluster Groups).
- Add a Resource >> More Resources >> Add SAP Resource.
(The number/letter in front of the service type may differ, depending on the products installed on your computer).
Changing the resource properties of the SAP Instance resource
- Right-click on New SAP Resource and select “Properties”.
- In the General tab change Resource Name to SAP <SID> <NR> Instance.
- Add the dependency to SAP <SID> <NR> Service to the dependency list of the resource:
- In the Policies tab, change value of Maximum restarts in the specified period to “0”.
If you did specify a different number than “0” your restarted A/SCS Instance will not copy the mirrored enqeue table and you will lose the SAP system locks during a restart of the instance!
- Unflag “If all the restart attempts fail”.
- In the Advanced Policies tab, check the Possible Owners.
If your cluster has more than two nodes you must specify exactly two nodes as possible owners. If you have selected one or three and more nodes, Enqueue Replication will not work!
- Switch to the Parameters tab and enter the values for SAP SID and System Number:
- Click OK.
Bring the new configured SAP Instance online
- Right click on SAP <SID> <NR> Instance.
- Select “Bring this resource online” to start the SAP instance.
After a few seconds, the resource will come online:
- Repeat these steps if you have a second SAP Instances in the same failover cluster group.
Switching Back to Generic Service Resource Type
If you need to switch back to the resource type Generic Service configuration for any reason, you perform the steps above with following changes:
- In step Create “SAP <SID> <NR> Service” resource as SAP Service resource type, you do select Generic Service as resource type instead of SAP Service.
In the New Resource Wizard you select the service SAP<SID>_<NR> and then click “Next” → “Next” → “Finish”.
- In step Modify the properties on the newly created cluster resource, you make the changes in the General tab.
You change the Resource Name value.
The changes in the tabs Dependencies and Policies are identical as shown above. The values in the Properties tab of above description is not necessary.