Connection pooling
- Last Updated: June 7, 2022
- 2 minute read
This string configures the driver to use connection pooling. Connection pooling allows you to reuse connections rather than creating a new one every time the driver needs to establish a connection to the underlying database.
DRIVER=DataDirect 8.0 Sybase IQ Wire Protocol;Pooling=1;ConnectionReset=connection_reset;
LoadBalanceTimeout=load_balance_timeout;MaxPoolSize=max_pool_size;MinPoolSize=min_pool_size;
NetworkAddress=network_address;Database=database;LogonID=user_name;Password=password;
where:
- connection_reset
-
determines whether the state of connections that are removed from the connection pool for reuse by the application is reset to the initial configuration of the connection. If set to
1, the driver resets the state of connections and if set to0, the driver does not reset the state of connections.
- load_balance_timeout
-
specifies the number of seconds to keep inactive connections open in a connection pool.
- max_pool_size
-
specifies an integer value to specify the maximum number of connections within a single pool.
- min_pool_size
-
specifies an integer value to specify the minimum number of connections that are opened and placed in a connection pool when it is created.
- network_address
-
specifies the unique identifier assigned to the Sybase IQ server machine. For example, SybaseIQserver, 2638. See "Network Address" for details.
- database
-
specifies the name of the database to which you want to connect.
- user_name
-
specifies your username.
- password
-
specifies your password.
The following example connection string includes the options required for configuring the driver for connection pooling.
DRIVER=DataDirect 8.0 Sybase IQ Wire Protocol;Pooling=1;ConnectionReset=0;
LoadBalanceTimeout=0;MaxPoolSize=100;MinPoolSize=0;NetworkAddress=SybaseIQserver1, 2638;
Database=Payroll;LogonID=John;Password=secret;