1

I wonder: What is the exact semantics of the "SAP instance number" that every SAP instance needs?

As the instance number is used to map between a SAP instance and port numbers, it's obvious that all instances running on one physical host (SAP cannot listen to specific addresses only, and they don't seem to be interested to change that, so the scope to listen on ports is each and every address found on a host) must have a different instance number.

However it's not clear whether the same instance number may be assigned to instances running on a different host, but belonging to the same sap system (SID). I think it might work, but I could not find any documentation on that.

Also, if two different SAP SIDs run on one physical host, the instances of each SID may not have common instance numbers, even though the instances are installed in separate directories (if SAP would allow to restrict listening to specific addresses of the host, different SIDs could use different listening addresses, and thus the same instance number, however).

Despite of the question about uniqueness, is there a common useful pattern how to assign instance numbers to all the instances used (e.g.: SCS, PAS, AAS, ENQ, ERS, etc.)?

U. Windl
  • 943

1 Answers1

1

First, you need to understand a little bit of SAP ECC (ERP Central Component) architecture.

There are three types of instances:

  • Dialog instance
  • Central Instance
  • Database Instance

SAP System = Dialog Instance + Central Instance + Database Instance.

When we are speaking about instance numbers, we are meaning specifically Central instance or Primary Application Server (PAS) instance number, because DIs and DBIs don't have own numbers.
This is not completely true, technically dialog instance has a number, but SAP user except BASIS admin never has a chance to encounter it, so for simplicity sake let's put it simple.

So if our SAP server has one central instance and several application servers (AS instances) all the subsequent application servers will have dedicated numbers.

Any instance in SAP world has unique identifier that comprises of host, instance # and SID (system ID):

<HOSTNAME>_<SID>_<INSTANCE NO>

this can be observed in SM51 transaction

enter image description here

You are correct that instance number is hardlinked to host port number which is essential to communication with SAP system, and that results in impossibility to have two identical instance numbers on the same host, disregard of they belong to different SIDs or the same one.

So returning to your first question:

it's not clear whether the same instance number may be assigned to instances running on a different host, but belonging to the same sap system (SID)

yes, it is totally probable scenario where one instance is distributed across multiple hosts. Here SAP system HMI instance 00 is distributed across 10 hosts

enter image description here

if two different SAP SIDs run on one physical host, the instances of each SID may not have common instance numbers, even though the instances are installed in separate directories

also true. This is also caused by the fact that Windows host can listen only for one port per per process and SAP instance process is not an exclusion here. Socket unique identifier is a tuple of {<protocol>, <src addr>, <src port>, <dest addr>, <dest port>}.

Despite of the question about uniqueness, is there a common useful pattern how to assign instance numbers to all the instances used (e.g.: SCS, PAS, AAS, ENQ, ERS, etc.)

no recommended pattern exists for this, and no best-practice, every company sets up this based on own needs and environment configs.

Suncatcher
  • 1,541
  • 4
  • 23
  • 44