on 2011 Jul 21 9:50 AM
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.
Request clarification before answering.
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)
“Seat”, or “ST” - A specific, identifiable, unique input/output device capable of directly or indirectly accessing and using a Program such as (without limitation) a terminal, personal computer, single user workstation, personal digital assistant (“PDA”), wireless device or real time device.
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 )
Per-seat editions authorize you to install and Use SQL Anywhere Client Software, on up to the number of Seats licensed, to access the licensed SQL Anywhere Server.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) Your remote desktop environment will indeed mask the number of unique users, so the SQL Anywhere server itself will not help you determine the number of licensed users currently accessing the server.
2) The SQL Anywhere server will not allow the number of UniqueClientAddresses to exceed the LicenseCount in a per-seat licensed server. It will return an error.
User | Count |
---|---|
76 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.