This feature was introduced in the Informix 12.10.xC10 fixpack release. It allows you to assign a character string to your CSDK or JDBC client session and identify that character string on the database server. This is useful for environments where same userid runs multiple instances of the same application, and there is a need to distinguish one session from the other.
This feature is implemented with a new CLIENT_LABEL environment variable that is set in your CSDK 4.10.xC10 or JDBC 4.10.JC10 client and is detectable on your IDS 12.10.xC10 database instance.
CLIENT_LABEL is set in the application environment and then is viewable on the database side with two methods: onstat –g env <sesID> and sysmaster:sysenvses.
(Note that SQL ‘SET ENVIRONMENT’ statement will also support CLIENT_LABEL in 12.10.xC11)
Here we set CLIENT_LABEL to two different strings and execute the same esqlc program. In this example, the session ids are 43 and 201.
Here we set CLIENT_LABEL to two different strings in the JDBC connection URL and execute the same JDBC program. In this example, the session ids are 232 and 234.
This is a simple, yet powerful way to more easily track sessions in your environment.
Senior Software Engineer
Connect with me on LinkedIn