Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
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.

Prerequisites


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.



  1. 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.

  2. 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



  1. Right click on SAP <SID> <NR> Service.

  2. 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

  1. Right Click on SAP <SID> <NR> Instance.

  2. Choose “Properties” >> Dependencies.
    In the standard configuration there is only one dependency defined:

  3. Switch to the Advanced Policies tab.
    Note the Possible Owners, you will need to specify them later.
    Note!
    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

  1. Right Click on SAP <SID> <NR> Service.

  2. 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.

  1. Right-click on SAP <SID> <NR> Instance.

  2. 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.

  1. Right-click on SAP <SID> <NR> Service.

  2. Click “Delete”.


Create “SAP <SID> <NR> Service” resource as SAP Service resource type



  1. Right click on SAP <SID> Services and Applications (Cluster Groups)

  2. 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



  1. Right-click on the new resource and edit the properties.

  2. Switch to the General tab and change the resource name.

  3. Go to the Dependencies tab and add a dependency to the SAP <SID> Fileserver resource.

  4. 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!

  5. In the Properties tab, specify the service name SAP<SID>_<NR> the resource is controlling.

  6. Click OK to change the properties of the SAP <SID> <NR> Service cluster resource.


Create SAP <SID> <NR> Instance Resource



  1. Right click on SAP <SID> Services and Applications (Cluster Groups).

  2. 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



  1. Right-click on New SAP Resource and select “Properties”.

  2. In the General tab change Resource Name to SAP <SID> <NR> Instance.

  3. Add the dependency to SAP <SID> <NR> Service to the dependency list of the resource:

  4. 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!

  5. Unflag “If all the restart attempts fail”.

  6. 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!

  7. Switch to the Parameters tab and enter the values for SAP SID and System Number:

  8. Click OK.


Bring the new configured SAP Instance online



  1. Right click on SAP <SID> <NR> Instance.

  2. Select “Bring this resource online” to start the SAP instance.

    After a few seconds, the resource will come online:

  3. 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.