Is there a way to limit concurrent license usage via Citrix or Terminal Services? The concurrent licensing model is based on connections per IP address, so in a thin client situation, where there are multiple instances of an application connecting from one IP address, there does not appear to be a way to limit the number of users. This can't be an issue that is just affecting us, so I am interested in any possible solutions or how others deal with this situation? |
One approach is to use the login_procedure to check the number of connections. There is an example that limits to 3 connections. You can extend the example to limit the number of connections to match the actual licensing by querying the server property LicenseCount
See http://dcx.sap.com/index.html#sqla170/en/html/3bcbde926c5f1014a802e3b03215f7b8.html*loio3bcbde926c5f1014a802e3b03215f7b8
http://dcx.sap.com/index.html#sqla170/en/html/3bc6ad206c5f1014b043b4cc42d7fc07.html*loio3bc6ad206c5f1014b043b4cc42d7fc07
Thank you Chris. The trouble with that approach is that there is no definitive way of knowing how many connections should be allowed per user. For example, say the main application only ever has three connections, that would be fine for the application itself, but there are other things that could use a connection over and above the application, e.g. dbremote.exe for synchronisation or some other utility. We actually have other utility applications beyond the main application itself as well, for example for creating reports. This would then prevent legitimate use as, in this example, dbremote.exe can use more than one connection, which could then prevent the application from running, as the connections are being used by the utility. The only way I can think this might work, is if it's possible to check the name of the executable connecting?
Sure. You can use connection_property('AppInfo') for that, which contains several
commasemicolon-separated values of interest. The client application can be extracted e.g.:with further parsing...
Note, optionally, you can also add your own "AppInfo" by supplying that via the AppInfo connection parameter, which can then be accessed by the "APPINFO" token of the AppInfo connection property:
So, AppInfo is both a connection property and an optional connection parameter... - possibly somewhat irritating...:)