How can I determine how many licenses are in use on a server in total?
And how does this relate to connections? A user can have several connections in my application to the server.
asked 21 Jul '11, 08:50
Ivan, The first step is to determine how your server is licensed, and then how many units it is licensed for. Use the LicenseType property to determine if your server is licensed on a per-seat or CPU basis:
select property( 'LicenseType');
Then you can request the LicenseCount property to determine how many seats or CPUs are licensed:
select property( 'LicenseCount');
You can also use the DBLIC command line utility to determine these things. On my Windows XP machine, the following command returns information about the license on my installed copy of SQL Anywhere:
dblic "c:\Program Files\SQL Anywhere 12\Bin32\dbsrv12.lic"
If you are licensed on a per-seat basis, then the license restricts the number of unique users. Here is the exact definition from the US license (found here: http://www.sybase.com/files/Legal_Docs/softwarelicense_United_States.pdf)
For SQL Anywhere, a per-seat license allows you to use exactly that many unique seats. Here are the SQL Anywhere specific rules (from http://www.sybase.com/files/Legal_Docs/Sybase_SQL_Anywhere_V12_PSLT.pdf )
It is up to you to understand your specific application architecture, and identify exactly who are your users. If you are using a standard client/server architecture, with different machines running an application that connects to the database server, then the UniqueClientAddresses property may help you determine how many machines have connections to the server, and hence, how many licenses are in use:
select property( 'UniqueClientAddresses');
Note that this approach doesn't work if you are using a web-like architecture with an application server, because each unique user's machine isn't making a direct connection to the database server. If this is the case, then your application will have to keep track of the number of users.
There is no restriction in the SQL Anywhere license on the number of connections that each user may have to the database server. The SQL Anywhere Personal Server is limited to 10 connections from the same machine, but the SQL Anywhere Network Server does not have a limit.
To obtain an accurate count of the number of connections in use, you can use the following SQL statement:
SELECT COUNT( * ) FROM sa_conn_info( ) WHERE number < 100000000;
You can read more about all the various utilities, statements and properties on DCX:
answered 21 Jul '11, 11:23