mkleehammer
unread,Jun 1, 2010, 11:22:58 PM6/1/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pyodbc
If you are using Windows, ODBC connection pooling should do this
automatically for SQL Server. (That is, I believe the SQL Server
driver checks connections when requested from the ODBC pool.) IIRC,
you should search for "SQLServer" "sp_reset" for more information
about this.
Otherwise, there isn't anything built-in to ODBC, so the thing to do
is to send the fastest message possible from your connection pool
code, something like "SELECT 1" (SQL Server) or "SELECT 1 FROM
DUAL" (Oracle).
If you are using PostgreSQL, I've heard good things about pgbounce
which does this for you. You conect to pgbounce and it is responsible
for serving good connections.
Not a great answer, I know, but I hope it points you in the right
direction.