StarQuest Technical Documents

StarLicense Licensing Recommendations

Last Update: 22 October 2009
Product: StarLicense
Version: 1.2 or later
Article ID: SQV00SL006

Abstract

The StarLicense software provides a flexible solution for controlling the use of StarQuest connectivity products within a network. With a StarLicense server, a license is checked out when the user of a client computer or an application/web server needs to use the StarQuest product.

StarLicense supports two types of network license: a "hard" license and a "soft" license. This document explains the differences between these two modes of licensing and recommends the type to use under various operating environments. This information is applicable only to StarLicense servers that service license requests for StarSQL clients (including StarSQL for UNIX and StarSQL for Java.)

Background Information

The StarLicense license server provides for a specific number of concurrent connections ( "CCs") to the database, determined by the license key issued by StarQuest. The license server enforces the maximum number of CCs and will deny clients the use of the driver if the maximum is reached. For example, a 10CC license key will allow a maximum of 10 simultaneous connections to any database by any number of StarSQL clients. This could be either one StarSQL client making 10 connections or 5 StarSQL clients each making 2 connections.

A client "checks out" a CC when the StarSQL driver connects to the database. Normally, a client "checks in" a CC when the StarSQL driver disconnects from the database. However, there are cases when an ODBC application, with an open connection to a database, ends unexpectedly or is stopped in a unconventional manner. This prevents any active CCs from being checked into the license server and made available to other users. The CCs that remain checked out but are no longer associated with a database connection from a client are termed "zombies".

StarLicense can handle abnormal situations (i.e., cases where the client fails to check in a CC) in one of two ways: 1) any zombies will be detected and harvested automatically, based upon StarLicense platform's TCP settings, or 2) the StarLicense server will harvest all connections after a specific period of time, specified by the administrator.

Solution

The following discussion is designed to answer common questions regarding StarLicense licensing.

What is the difference between a "hard" and "soft" license?

StarLicense supports two types of network license: a "hard" license and a "soft" license. The type of method used determines how StarLicense manages licenses and how it detects and eliminates zombies.

Hard licenses maintain a persistent TCP-IP connection from the StarSQL client to the StarLicense server for the duration of the connection to the database. When the client disconnects from the database, the license will be released and made available to another StarSQL client.

Any zombie CCs will automatically be cleaned up by the StarLicense server according to the platform's TCP-IP settings. You may need to modify the TCP KeepAlive settings if you want StarLicense to be able to clean up abandoned licenses more quickly. Refer to the StarQuest Technical Document Configuring TCP KeepAlive Parameters for more information. If modifying the TCP KeepAlive settings is impractical or not possible, configure StarLicense to use a soft license instead.

Soft licenses allow clients to use the license without maintaining a persistent TCP-IP connection to the server. After the license is checked out, it remains active in the server for the specified time-out period. Once the time-out period has been reached, the StarLicense server automatically harvests the CC, making it available to another StarSQL client.

In this case, the client must periodically renew the license. While renewal is automatic and does not require any explicit application programming, a soft license policy may be impacted by the application due to connection pooling or periods of inactivity (as a result of application logic, for instance). Since the renewal must occur within 30 seconds of the time-out period, use of a soft license is only recommended if the connection is likely to be used frequently and not left unused for more than the time-out period.

StarSQL is running on an application or webserver, which type of license is best to use?

We recommend using a soft license in this type of environment primarily because application and web servers may delay the cleanup (i.e., garbage collection) of the StarSQL driver after it has been used by an application and this prevents a "hard" license CC from being checked in to the server.

Important Note: Application and web servers often use connection pooling to improve performance which means that connections may stay in a connection pool for extended periods of time. A client connection to the database may be impacted by the expiration of a soft license CC if the client attempts to use an expired connection and the driver is unable to obtain a renewal. Therefore, if the application/web server has connection pooling enabled, it is important that the soft license time-out value be greater than the connection pooling time-out value.

My network contains many StarSQL clients on individual workstations, should I use a hard license?

In this type of environment, we suggest using a hard license. Since the client maintains a TCP-IP connection to the StarLicense server for the duration of the database connection, the license usage by individual clients can be more readily monitored and managed using the StarLicense Manager.

In the event that a client application does not cleanly disconnect from the database and subsequently check in a CC, StarLicense will automatically detect and clean up the zombie CCs. If you want StarLicense to clean up abandoned CCs more quickly, modify the TCP-IP KeepAlive settings according to the StarQuest Technical Document Configuring TCP KeepAlive Parameters.

How do I configure StarLicense to use a soft license?

UNIX

  1. Log on as root user.
  2. Open the /etc/starlicense.rc file in a text editor.
  3. Set the Grace keyword value to the desired timeout value (in seconds) and save the file. For example, if you want the CCs to time out after 10 seconds, configure the starlicense.rc as follows:
  4. [ServerLicense0]
    Cookie=<license string>
    Grace=10

  5. Stop and restart the StarLicense daemon, using the StarLicense Management Main Menu (/starlicense/configure).

Windows

  1. Launch the StarLicense Manager.
  2. If the service is not running, right-click on the Server in the left pane and select Start.
  3. Right-click the server in the left pane and select Configuration.
  4. On the Licenses tab, highlight the license entry and click Edit.
  5. Check the Enable soft-license box and enter a time-out value (in seconds). Click OK when finished.
  6. Stop and restart the StarLicense service.

 


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.