Sunday, March 25, 2012

Dropped connections, but open on the SQL Server...

I have a frustrating issue that hopefully someone can help with.
I have a few remote users that connect to the sql server through 1433 and
sql authentication (the ISA firewall only allows their IP addresses to
connect). They connect through an ODBC connection with no Idle timeout.
These users are getting their connections closed but I look at the EM and
the connection is still open. If I have them connect via VPN first,
everything works fine - the connection is never closed. Do you know why a
standard ODBC connection would close itself only if it's not behind a VPN?
I can't figure it out for the life of me!! There must be some timeout
parameter somewhere that I have set, but I can't find it...
Any ideas would be greatly appreciated!
Regards,
Brett Wickard
Hi Brett,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood you would like to close ODBC
connection when the user terminate the connection. If I have misunderstood
your concern, please feel free to point it out.
First of all, please use sp_who in the Query Analyzer to make sure the
connnection from these remote customer remain alive.
Secondly, how does your customer connect to SQL Server? If you utilize ADO
in your VB application to access the SQL Server, please try the following
sample code.
Dim cn As New ADODB.connection
Dim cmd As New ADODB.Command
cn.ConnectionTimeout = 45
cmd.CommandTimeout = 15
cn.close
For more information, please refer to Microsoft SQL Server Books Online
with the keywords 'ADO' and 'connectiontimeout' or 'commandtimeout' as the
search topics.
Last but not the least, the following KB describes how to define the
orphaned connection and set OLE DB Provider for ODBC's timeout settings.
INFO: OLE DB Session Pooling Timeout Configuration
http://support.microsoft.com/kb/Q237977
INF: How to Troubleshoot Orphaned Connections in SQL Server
http://support.microsoft.com/kb/Q137983
INFO: Frequently Asked Questions About ODBC Connection Pooling
http://support.microsoft.com/kb/Q169470
Resource Pooling
http://msdn.microsoft.com/library/de...us/oledb/htm/o
ledbresourcepooling.asp
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment