Sql Server connectivity issues (Article # 258)
View products that this article applies to.
Problem:
One customer reported an intermittent problem connecting to microsoft sql server 7 (mssql 7) using fcClient and the fcSDK after upgrading to the 2.0 version of the .NET Framework.
Random errors could occur, including:
Warning: File /client/fsglog/grid_logistics.asp Line 126 An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server). .
This connectivity issue was also seen when using Data Verifier:
Initialize ClarifyApplication
Verifies that FCFL.NET can be initialized against this database
Error initializing FCFL.NET ClarifyApplication
System.Data.SqlClient.SqlException: General network error. Check your network documentation.
Server stack trace:
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at FChoice.Foundation.Clarify.DataVerifier.Core.FcflNetDomainVerifier.TestClarifyApplication(NameValueCollection envVals)
at FChoice.Foundation.Clarify.DataVerifier.Core.FcflNetVerifier.c(NameValueCollection A_0)
Resolution:
Microsoft technical support suggested the following:
1 - Update the connection string used by fcClient to force the use of TcpIp as opposed to named pipes.
fchoice.connectionstring=uid=sa;pwd=xxxxxx;Initial Catalog=MyDatabase;Data Source=tcp:MyServer
Notice the use of the "tcp:" string in the data source.
2 - Added the following registry entries:
HKLM System -> CurrentControlSet -> Services -> TCPIP -> Parameters
DWORD "TcpTimedWaitDeplay" Decimal 40
DWORD "MaxUserPort" Decimal 40000
These registry changes should not be undertaken lightly.
It is recommended that you consult with a Network administrator.
Resolution:
Another possible resolution:
Using the SQL Server Client Network Utility, create an alias to your
SQL Server, being sure to specify TCP/IP as the Network library. I
typically set the server alias to be the same as the server name.
Applies To: