LDAP Service Fails to Reconnect to the SQL Server Store Due to Sessions That Are Invalidated by a Router (264765)



The information in this article applies to:

  • Microsoft Site Server 3.0

This article was previously published under Q264765

SYMPTOMS

If a firewall determines that a session has become inactive, it can discard the LDAP communications to the SQL Server computer when it is configured to do so. Due to unsuccessful attempts to connect, the LDAP server then logs error messages repeatedly in the event log. The following error message (message ID 20) is logged as a result of the attempt to perform the connection to the database server:
Unable to connect to DB server with connect string
The LDAP server expects to be able to connect to the database server. In many cases involving a temporary network issue, the reconnect will work. However, in this case, the session between the LDAP server and SQL Server has been invalidated.

CAUSE

If the network configuration includes routers that are configured to invalidate inactive sessions, the LDAP server is not able to reconnect to the SQL Server data store. As a result, the session must remain regularly active.

RESOLUTION

To prevent a networking device, such as a router, from invalidating a session, you can disable ODBC connection pooling. This ensures that a TCP session is established when database connection requests are performed.

To disable ODBC connection pooling, perform the following steps:
  1. In Control Panel, double-click Settings.
  2. Select ODBC Data Sources.
  3. Click the Connection Pooling tab.
  4. Select the SQL Server ODBC Driver from the list.
  5. Double-click SQL Server to set the Connection Pooling attributes.
  6. Select Don't pool connections to this driver.
When you do this, the LDAP service performs the operations required to establish a session when a connection operation is performed. This results in a TCP handshake operation that is performed between the LDAP and SQL Server computers. A session is established, and as a result, if there has been no activity between the LDAP and SQL Server computers for some time, a new session is established when a connection request is made. This is a valid new session that the firewall configured should recognize.

MORE INFORMATION

Protocol Analysis Summary

When the connection pooling is disabled, TCP re-negotiation, including the three-way handshake (ack...) takes place during the database connection process. This does not occur with connection pooling enabled.

Although the LDAP server is sending TDS packets to the SQL Server computer in an attempt to re-establish the database connection, there is no connection with pooling enabled.

With pooling disabled, LDAP also sends TDS packets, but prior to attempting this database connection, the TCP session is established through the handshaking process.

Events Logged

The following events are logged repeatedly:
Source: PM Directory Store
EventID: 30
SQL Error: HRESULT: 80004005 Minor Code: 11 Source: Microsoft

OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC SQL
Server Driver][dbmssocn.dll]General network error. Check your network
documentation. SQLErrorInfo: 11, 08S01
Source: PM Directory Store
EventID:20
Unable to connect to DB server with connect string: Driver={SQL
Server};SERVER=dmqsqlcluster;DATABASE=ldap1;UID=ldap_server;PWD=
*****;NETWORK=dbmssocn.dll. Validate login and verify
database is running with TCP/IP support.
Source: PM Directory Store
EventID: 130
Consecutive DB connect failures exceed threshold with connect string
Driver ={SQL Server};SERVER=dmqsqlcluster;DATABASE=ldap1;UID=ldap_server;
PWD=*****;NETWORK=dbmssocn.dll. Putting DB in recovery mode.
Source: PM Directory Store
EventID: 131
DB recovery timeout overridden on connect string Driver={SQL Server};SERVER=dmqsqlcluster;DATABASE=ldap1;UID=ldap_server;P WD=*****;NETWORK=dbmssocn.dll. Verify system integrity.

Modification Type:MajorLast Reviewed:2/22/2001
Keywords:kbprb KB264765