- This topic has 1 reply, 2 voices, and was last updated 12 years, 11 months ago by .
-
Topic
-
Has anyone implemented connection pooling for sql server connections? I’m not quite sure how that would work in the engine, as the tcl pooling proc would need to be running 24×7 as a seperate thread, or?
In lieu of a connection pool it seems a persistent odbc connection (per thread) would be a good thing.
We have several tcl procs on threads that currently open and close db connections many times a day, when each thread could be reusing the same connection, one connection per thread. For that to work you could have your dbopen(hdbc) proc have a db connection handle (SQL_HANDLE_DBC) passed in and check to see if the handle is valid and open. If so just return w/o opening another connection.
Our dbas would rather we kept a connection open rather than opening a closing a connection many times a day. More efficient to keep the connection open.
For closing a handle you could do that on the shutdown mode of the upoc using odbc?
Just throwing this out here for thoughts on the issue.
thanks,
Steve
- The forum ‘Tcl Library’ is closed to new topics and replies.