Client requirements for execution

To implement a multiplexed connection, set the multiplexing option, in the client sqlhosts file or registry, on the dbservername parameter of the database server to which you will connect. To specify multiplexing, set the m option to 1. The following dbservername parameter specifies a multiplexed connection to the personnel database server:
Servername nettype hostname servicename options
personnel onsoctcp corp prsnl_ol m=1

Setting the multiplexing option to zero (m = 0), which is the default, disables multiplexing for the specified database server.

To use multiplexed connections for any application that was compiled before version 9.13 of Informix® ESQL/C for UNIX™ or version 9.21 of Informix ESQL/C for Windows™, you must relink it. Applications that you compiled before these versions of Informix ESQL/C can connect to a multiplexing database server, however. The database server establishes a non-multiplexed connection in this case.

On Windows platforms, in addition to setting the multiplexing option in the sqlhosts registry you must also define the ifx_session_mux environment variable. If you do not define the ifx_session_mux environment variable, the database server ignores the multiplexing option and does not multiplex connections.
Restriction: On Windows, a multithreaded application must not use the multiplexed-connection feature. If a multithreaded application enables the multiplexing option in the sqlhosts registry entry and also defines the IFX_SESSION_MUX environment variable, it can produce disastrous results, including crashing and data corruption.
If a multithreaded application and a single-threaded application are running on the same Windows computer, the single-threaded application can use a multiplexed connection in the following two ways:
  • Use different sqlhosts information.
  • Use a dbserver alias in the sqlhosts file that does not specify the multiplexing option. For example, you could use the following configuration:
    Servername Nettype Host name Servicename Options
    personnel onsoctcp corp prsnl_01 m=1
    personnel_nomux onsoctcp corp prsnl_02

Any multithreaded application connecting to the personnel server uses the servername personnel_nomux while single-threaded applications can continue to use the servername personnel.