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.)?

