Welcome to MSDN Blogs Sign in | Join | Help

SQL Protocols

Topics from the Microsoft SQL Server Protocols team - Netlibs, TDS, SQL Browser, etc...
SQL Server 2005 connectivity error messages

One of the more visible changes we made in connectivity space for SQL Server 2005 was enhancing error messages reported to the user in case of connection failures.  I have seen several cases over the last several months, and in this post I would like to list some of them with the root cause that caused them.  The cause may not be the only one triggering a particular error message, and there may be other error messages of interest. 

This is a semi-random selection from real cases I investigated.  Likely I will post another batch some time in the future, and I would be happy to see replies with additional errors, particularly if the root cause is unclear. 

The examples are from various client stacks – ODBC or OLEDB from SQL Native Client or from managed SqlClient. 

The exact formatting of the messages will depend on the application you use.  Most of the examples below used OSQL, SQLCMD, or SQL Server Management Studio. 

  • Connecting to a server by the server’s name from SqlClient, the server name is aliased to TCP, the server is up and running but it does not listen on TCP (or is not running at all):

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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

  • Local connection from SqlClient; server is not running:

(a) default instance:

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) (Microsoft SQL Server, Error: 2)

(b) named instance:

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: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

  • Remote connection from ODBC, Windows Firewall is turned on on the server machine but there is an exception for File and Printer Sharing:

 [SQL Native Client]Unable to complete login process due to delay in opening server connection

  • A successful TCP connection from SqlClient to the server was broken due to a TCP keep-alive heartbeat failure (typically indicating problems with the underlying network infrastructure):

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)

Possibly:

A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

  • OBDC connection attempt when server is not ready to process a new local connection, possibly due to overload: 

[SQL Native Client]Shared Memory Provider: Timeout error [258].
[SQL Native Client]Login timeout expired
[SQL Native Client]Unable to complete login process due to delay in prelogin response

[SQL Native Client]Shared Memory Provider: Could not open a connection to SQL Server [121].
[SQL Native Client]Login timeout expired
[SQL Native Client]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.

  • There is a space after server name in the connection string:

osql -E -S "<serverName> ,1433"
Login failed for user ''. The user is not associated with a trusted SQL Server connection.

The server ERRORLOG/EventLog shows something similar to:

2005-08-11 12:46:04.29 Logon       Error: 17806, Severity: 20, State: 2.
2005-08-11 12:46:04.29 Logon       SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: <IP address>]
2005-08-11 12:46:04.29 Logon       Error: 18452, Severity: 14, State: 1.
2005-08-11 12:46:04.29 Logon       Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: <IP address>]

  • Remote OLEDB connection using TCP to a server that is blocked by Firewall

HResult 0x274C, Level 16, State 1
TCP Provider: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Error: Microsoft SQL Native Client : 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..
Error: Microsoft SQL Native Client : Login timeout expired.

  • Remote OLEDB connection using TCP to a server that is either not running or does not have TCP/IP protocol enabled for incoming connections (but is not blocked by the Firewall on the server machine):

HResult 0x274D, Level 16, State 1
TCP Provider: No connection could be made because the target machine actively refused it.

Error: Microsoft SQL Native Client : 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..
Error: Microsoft SQL Native Client : Login timeout expired.

Peter Gvozdjak, SQL Server Protocols

Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights

Posted: Wednesday, September 28, 2005 3:50 AM by SQL Protocols

Comments

Joe SQL said:

What is the value of this blog? You've posted the error messages - likely the messages we are seeing - but there are no suggested resolutions.
# November 10, 2005 12:18 PM

SQL Protocols said:

This is a quick list compiled from the early Beta experience with SQL Server 2005. To get it out quickly I tried to list at least the root cause. I plan to update it with resolutions and more error messages moving forward.

If you encountered any specific message, can you let me know?

I will be glad to work with you on resolution, an updating this blog accoprdingly.

You may also want to check additional blogs posted by Ming Lu from our team, which contain resolution to many of the connectivity problems:

http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx

http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx

# November 10, 2005 2:42 PM

Lunchbox027 said:

I've been getting the following message when trying to run Management Studio Express and also a similar error with Altiris Depoloyment Solutions for Clients 6.5 trying yo connect to SQL Server Express.

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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

My TCP/IP and Named Pipes are both enabled, I've reinstalled everything several times with no luck. I'm just a Tech, and still learning my way around databases so there might be something simple that I missed. :P My boss has only had a couple minutes to help me out and he couldn't come up with anything. Any info you could give would be greatly appreciated, and I will keep you updated as to my failures/success so you can help build your FAQ.
# December 1, 2005 4:28 PM

SQL Protocols said:

Error[provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it] indicates that your TCP/IP was not enabled or your sql server was not listening on the appropriate port.
1) After installing SQL Express, by default, TCP/IP was disabled, please see http://blogs.msdn.com/sql_protocols/archive/2005/11/14/492616.aspx to enable remote connection for SQL Express.
2) Please check errorlog to make sure server TCP was enabled.
- Key words indicates server TCP/IP is enabled –

Server is listening on ['any' <ipv4> <Port Number>] or

[ <ipaddress> <ipv4> <Port Number>].

First one is when enabling server “ListenonAllIPs”, and second one is when server listening on individual IP. To further verification, you can test whether sql server is listening on the exact port using "netstat -ano| findstr <PortNumber>".

3)Try to connect to the exact port that server was listening on and see what happens.

If you still face the same problem, please attach your errorlog info and your connection string(eg, you connect through "."/"(local)"/<hostname>, etc.. and whether you specified any protocol prefix(eg, lpc:/np:/tcp:).

Thanks
Ming.
# December 7, 2005 1:17 AM

Bob Anderson said:

I'm seem to be having an upgrade issue. I have upgraded my client tools to 2005 and am trying to connect to an existing SQL Server 2000 box. I have a named data source pointing to a port on my local machine which is then forwarded through an SSH connection. The 2000 client tools had no trouble connecting; I also have no trouble connecting via a Perl script, but I can't connect using Management Studio. I get the first error you have listed above.

Any ideas what the problem might be? Thanks
# January 2, 2006 6:45 PM

SQL Protocols said:

Hi, Bob

As Peter mentioned in the blog, your sql server might not listen on TCP port properly under this situation.Please follow below steps to troubleshoot:
Go to Server Network Utility, if you enabled TCP on the server,you can see TCP/IP is in the "Enabled Protocols" and click properties of it, get which port configured,then

1)netstat –ano |findstr <PortNum>

2)go to server ERRORLOG see whether server is listening on TCP protocol,you should see "SQL Server is listening on TCP" in the log.

3)or use c:\Program files\Microsoft SQL Server\90\tools\binn\osql /S<Instance>,<PortNum>, see what happens.

4)It sound that you connect to SQL Server using alias, so, please go to SQL Server Client Network Utility,choose "Alias" tab, check whether you configured the same port that server was listening on in the TCP Alias properties.

If you still have further question, please attach the log file and the connection string( how do you make connection).

Thanks!
Ming.
# January 3, 2006 5:58 PM

SqlRick said:

This may be plain silly, but I was struggling with this for 30 minutes because I used a small -s instead of a large -S when specifying the server. You get this connectivity error message instead of a command syntax message and believe your network connectivity is the issue.
# January 20, 2006 1:32 AM

SQL Protocols said:

if you try "osql /?" or "sqlcmd /?", you will see:

-S:server
-s:colseparator

Hence, if you make connection like:
"OSQL /s<machinename> /E" it equals to "OSQL /S /E" without specify server and by default it make connection to local default instance.

Thanks!
Ming.
# January 23, 2006 10:41 PM

Junifer said:

Hello guys,

I just downloaded and installed the VWD 2005 Express Edition, i followed the tutorial on the msdn until i got this exact error:

An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be cause by the fact that under the default setting SQL Server does not allow remote connections.(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Sever)

Sorry but i'm in .net i am a asp developer for years now but i use msaccess so no experience in SQL Server.

Thanks,
Junifer.
# February 5, 2006 12:35 AM

SQL Protocols said:

If you need to access the SQL Server back-end from a remote machine you need to enable remote connections.  See this for a reference:

http://blogs.msdn.com/sql_protocols/archive/2005/11/14/492616.aspx

Thank you,
Peter
# February 6, 2006 5:59 PM

Nitin said:

I am getting the following error while i try to open a SqlConnection(using  C#) if the SQl Server is paused.

Source : .Net SqlClient Data Provider
Message : A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The system cannot open the file.)

The error number for this err is 4. (SqlException.Number)

However if the open this connection again then i get the following error

Source : .Net SqlClient Data Provider
Message : SQL Server has been paused. No new connections will be allowed.

Login failed for user '(null)'.

So this is correct and the error number for this is 17142.

So my question is why does i get the error number 4 in the first place and the subsequent runs gives the correct error.




# February 7, 2006 4:31 PM

Vitgar said:

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) (Microsoft SQL Server, Error: 2)

to correct this error in SQLEXPRESS on servername use [servername]\sqlexpress, this should work
# February 13, 2006 2:04 PM

Aji Jose said:

Please give me a solution for the following error, which occured when i am trying to connect  sql server2005 from remotely.

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: SQL Network Interfaces, error: 28 - Server doesn't support requested protocol) (Microsoft SQL Server, Error: -1)
# February 13, 2006 4:43 PM

angi said:

Please give me a soluten for the following error when trying to open the migrated DTS-Packages from SQL Server 2000 on the MSDB-Node/Refresh:


TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

Login timeout expired
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.
Named Pipes Provider: Could not open a connection to SQL Server [2].  (Microsoft SQL Native Client)

------------------------------

Login timeout expired
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.
Named Pipes Provider: Could not open a connection to SQL Server [2].  (Microsoft SQL Native Client)

------------------------------
BUTTONS:

OK
------------------------------

# February 14, 2006 8:32 AM

Gokul said:

hi, i get this error when i run my project. i am using a remote server. it is running. but i am getting the error when i am adding a webpart to the page. otherwise it is running fine. do clear my bug. thanks.

gokul.
# February 28, 2006 5:37 AM

SQL Protocols said:

If the error message contains the string "SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified" it is most likely caused by one of the two following causes:

(1) The SQL Browser process is not running on the server box.  

and/or

(2) The SQL Browser's UDP port 1434 is blocked by firewall.  You can grant exception either to UDP port 1434 or to SQL Browser process.  
# February 28, 2006 12:54 PM

Shahid said:

Can someone please help me with this error.

===================================

Cannot connect to CNF52307XV.

===================================

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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (.Net SqlClient Data Provider)

------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10061&LinkId=20476

------------------------------
Error Number: 10061
Severity: 20
State: 0


------------------------------
Program Location:

  at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
  at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
  at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
  at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
  at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
  at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
  at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
  at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
  at System.Data.SqlClient.SqlConnection.Open()
  at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
  at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

# March 3, 2006 12:57 PM

SQL Protocols said:

Shahid,

This error suggests that (a) your client specifies to use TCP but (b) your server is not listening on the TCP protocol but (or at least not on its default port).  

Regarding (a): the TCP protocol is most likely specified in the connection string or in an alias with the name of the target server.  Is your intent to use TCP?  

If yes, we get to part (b).  Most likely you need to enable the TCP protocol on the server, and retsart the server.  Instructions on how to do this for SQL Express are in http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx.  The steps are the same for other SQL Server editions, just "Click on the Protocols for MSSQLSERVER" instead of "SQLEXPRESS" if your server is installed as a default instance (or for the appropriate instance name if it is a named instance).  

Peter
# March 3, 2006 10:48 PM

Saeid said:

Hi
When i install Sqlserver Express it doesn't ask about Default or Instance Setup. After installing it connect as ServerNema\SQLEXPRESS
I want to change connection name to just ServerName. What should i do?
Thank you for helping me.
# March 15, 2006 12:59 AM

SQL Protocols said:

Hi, Saeid

 By default, SqlExpress was installed as a named instance and with TCP and Named Pipe are disabled.

 You can not change a named instance to a default instance, if you really want to use only servername in the connection string, you can spcify the tcp port like "Server=<machinename>,<port>" after you enabled Tcp; but if you only want to use shared memory or named pipe, we suggest you keep using "Server=<machinename>\sqlexpress".

Here is useful info for SqlExpress

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
# March 15, 2006 12:57 PM

SQL Protocols said:

And if you really want to access it through Server=<machinename> you can create an alias through SQL Server Configuration Manager with the name of the machine connecting to your SQL Express.  

Thanks,
Peter
# March 15, 2006 1:07 PM

Aaron Gregory said:

Has anyone tried accessing a SQL 2005 Enterprise from a local machine with Symantec Client Firewall (v 7.1.0) installed?  When trying to update diagrams locally, I get the following message with the firewall enabled:

"A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) (.Net SqlClient Data Provider)"

* * *

Of course, when disabled, I am able to update diagrams.

Does anyone know of a workaround to update diagrams locally with the firewall enabled?  Or, is that just a pipedream?

Thanks.

# March 20, 2006 6:18 PM

SQL Protocols said:

Try specifying the server by its loopback IP address, 127.0.0.1 in the IPv4 case.  And let us know the result.  

Thanks,

Peter

# March 20, 2006 7:22 PM

SQL Protocols said:

Alternatively, you can use a protocol other than TCP (Shared Memory and/or Named Pipes) if you have it enabled on your SQL Server.  By default SqlClient first tries to use Shared Memory on a local machine.  
# March 20, 2006 7:33 PM

Christopher Cheng said:

For those who gave up, try one more thing:
Start "SQL Server Configuration Manager",
In "SQL Server 2005 Network Configuration" > "Protocols for SQLEXPRESS", Click on the tab "IP Addresses", Change all TCP Port to 1433.
Yes, I mean all, even "IPAll", then it will work!
# March 21, 2006 12:54 AM

Daryl said:

I am getting a very troublesome error using SQLExpresss 2005.  I had a developer write an application utilizing SQLExpress 2005, and I can connect to the server, view all the data (customers, orders, setup tables, etc.), I can connect to the database via Access (ODBC), everything works fine until I try and print an order.  Then it comes up and says "An error has occured while establishing a connections to the server.  When connecting to SQL Server 2005, this failure may be cuased 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).  I have enabled remote connections, both TCP/IP and named pipes, made sure that both loopback and actual machines IP address are not only active, but enabled, and like I said previously, am able to view & update data through application, but can seem to print.  Not sure what is going on.  ANY help would be greatly appreciated.  Thanks in advance.
# April 17, 2006 11:46 AM

Matt Neerincx [MSFT] said:

You need to contact the developer who wrote the Access application.  The report you are trying to print is referencing an old linked table most likely.  Open the report in design view and select View|Properties and look at Record Source property, this might give you a clue.  But in general the report could be referencing an old linked table just about anywhere so you have to dig through the report in design view until you find it.
# April 17, 2006 8:52 PM

Arthur Berlin said:

I also have this error message:

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

...And I disabled de firewall, added SQLSERVER to Firewall exceptions, executed aspnet_regsql.exe to add the instance and nothing... configuring in options of visual studio environment to setup the instance of SQL Server 2005... I have this backgrouds: I have installed SQL Server 2000 and Visual Studio .NET 2003 and I have not SQLEXPRESS Edition but SQL Server 2005

What should I do??

Thsnks a lot...
# April 29, 2006 5:20 PM

Paul Nguyen said:

If you are trying to remote connection to Sql Server 2005, you need to enable your TCP/IP Protocol in your SQL Server Configuration Manager.

SQL Server Configuration Manager
-> SQl Server 2005 Network Configuration
  -> Protocols for <instance>

After enabling the TCP/IP, you need to restart the SQL Server for the changes to be in affect.
# May 2, 2006 12:27 PM

JInn said:

When my PC connecting the SQL Server 2005,
the Error occurred as follows:
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 setting SQL Server does not allow remote connections.(provider:Named Pipes Provider,error:40 - Could not open a connection to SQL Server)(Microsoft SQL Server,Error:53)

But others pc could connect it!
The TCP/IP is enabled state and Named Piped is enabled state
# May 7, 2006 6:52 AM

Srinivas said:

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)
# May 8, 2006 4:22 AM

SQL Protocols said:

Jinn,

Error code 53 often indicates that the server is not reachable from the client machine.  If you run the following two commands on the client machine, what do you get (I assume the server is installed as a default intsnace):

telnet <serverMachineName> 1433

ping <serverMachineName>
# May 8, 2006 8:39 PM

SQL Protocols said:

Srinivas,

Are you able to retrieve the Number member of the SqlError objact in the SqlErrorCollection contained in the SqlException thrown?  
# May 8, 2006 8:41 PM

Andrew said:

Does anybody know how to fix the following:

Unable to complete login process due to delay in
prelogin response.

This seems to happen every 1-2 hrs and we have to restart the SQL service, then it is fine.

We usually use tcp/ip for our connections.

When the server starts refusing connection on tcp/ip, we can still connect using namedpipes or the dedicated admin port (tcp 1434).

A few sites mention the erro but no-one can suggest a fix or even further routes for investigation.

Thanks in advance
# May 21, 2006 4:32 AM

Koterpillar said:

"An error has occurred while establishing 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: HTTP Provider, error: 0 - )"

This occurs randomly, but always under heavy _client_ load. I suppose client first tries some other "provider", but fails, and HTTP provider isn't configured.
# May 29, 2006 9:48 AM

Lil Turtle said:

I am getting the following error when trying to run an ASP.NET 2.0 application using a connection to SQL Server 2000,

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: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)

I don't understand why the application is trying to connect to SQL 2005 server when it is not specified.

Thanks.
# May 30, 2006 11:50 AM

SQL Protocols said:

1) Were you trying to make local or remote connection?
2) What does your connection string looks like, please try removing "lpc:" prefix if you specified.
3) Run *cliconfg* in the command line, check off box "enable shared memory protocol".
4) Double check whether your SQL 2000 instance started successfully, and listen on shared memory / named pipe/ tcp from server errorlog.

If you still face problem, please provide your connection string and server errorlog.

Good Luck!
Ming.

# May 30, 2006 1:58 PM

Matt Neerincx [MSFT] said:

Additional note, this error message tends to confuse alot of customers with the SQL 2005 part.   The error message can occur when you attempt to connect to ANY version of SQL Server, it does not mean that the driver is trying to connect to some SQL 2005 server.
# May 30, 2006 2:07 PM

Harold Bright said:

If you are connection to a local sql server using SqlClient try using Server Name as '.' this worked for me.

But i am not able to connect to the remote server running sql server 2000. I also tried modifying the HOSTS file still not able to work out. Please drop a mail on my website if someone finds something. thanks.
# May 31, 2006 7:43 AM

Varghese Cherian said:

I had problems connecting to my SQL Server edition that came with Visual Web Developed 2005 Express Edition version. The error was that a remote connection could not established error: 40. I solved it by opening SQL Server Configuration Manager explan SQL Server 2005 Network Configuration clicked on Protocols for SQLEXPRESS to find that Shared Memory was enabled but TCP/IP wasnt and once I enabled it, the connection was established.
The server is running in the same machine as the development environment.
One additional thing to note is that you should give <<server or machine name>>\SQLEXPRESS as your data source while trying to add a connection
# June 10, 2006 3:28 AM

Nam said:

Hi Ming,

I get the error:
[sqsrvres] printODBCError: sqlstate = 08S01; native error = 2746; message = [Microsoft][SQL Native Client]TCP Provider: An existing connection was forcibly closed by the remote host.

followed by several these other errors
[sqsrvres] printODBCError: sqlstate = 08S01; native error = 40; message = [Microsoft][SQL Native Client]TCP Provider: The specified network name is no longer available.
[sqsrvres] printODBCError: sqlstate = 08S01; native error = 40; message = [Microsoft][SQL Native Client]Communication link failure
[sqsrvres] OnlineThread: QP is not online.
[sqsrvres] CheckQueryProcessorAlive: sqlexecdirect failed

and it looked to me like it is potentially related to :  A successful TCP connection from SqlClient to the server was broken due to a TCP keep-alive heartbeat failure (typically indicating problems with the underlying network infrastructure)

that you mentioned from above i was wondering what type of network problems could be affecting my cluster?  I have disabled Netbios/wins and only have Named Pipes and TCPip on the server...also when i shut down the passive node on my cluster the errors will still pop up... I assume the issue has something to do with the heartbeat on the active machine but thus far have been unable to determine the cause of the error.  Also to note...when i enable netbios/wins the problems happen more frequently  from once a day to multiple times an hour.  Using server 2003 x64 sp1 and sql 2005 sp1 x64

Thanks
# June 21, 2006 11:25 AM

Sonu said:

I want immediate answer on this. Plz help
# June 22, 2006 5:24 AM

Anita said:

Hi Ming,
Me too trying to connect to SQlServer 2000
But am getting the same error.Could u plz tell how to solve it! I tried checking off "enable shared memory protocol".But it didnt worked out

Thanks in advance
# June 22, 2006 5:33 AM

SQL Protocols said:

Hi,Anita

  Did you get error: "TCP provider: An existing connection was forcibly closed by the remote host"? Did you make remote connection or local connection. To solve this: you need check several things:

Server side:

1)Go to services.msc, see whether you sql 2000 was started successfully.
2) Go to server error log, see whether TCP was enabled and server is listening on <ip>,<port>
3) netstat -ano | findstr "<port>" double check server was listening on the exact port
4) If you were making remote connection, double check <port> is in the firewall exception list.

Client Side:
5) Try telnet <serverip> <port> see whether it succeeds.
6) Try change your connection string if you have "tcp:" prefix, remove the prefix,see what happens.
7) Try change your connection string to " Server = <machinename>[\<Instance>],<serverport>/ or Data Source = <machinename>[\<Instance>],<serverport>"

If it is local connection, <machinename> is local hostname, if it is remote connection, <machinename> is remot host name; <port> is the portnumber that server was listening on; <Instance> is the instance name of your sql server, your sql 2000 is default instance or named instance? If default instance, the port should be 1433, if named instance, see the errorlog to check.

If you have further question:
1) Please give me what error you saw?
2) Your connection string?
3) Client/Server OS?
4) server errorlog?
5) local/remote connection?

Good Luck!
Ming.
   
# June 22, 2006 11:39 AM

SQL Protocols said:

Hi, Sonu

   Sorry, I did not see the question you posted? Could you give more specific info?

Thanks!
Ming.
# June 22, 2006 11:43 AM

Thomas said:

Hi All


I have been having the same error I have narrowed it down to being the SQL Server Express 2005 not switching on properly.

These are my issues, everytime i go to the sql server configuration manager and switch on the sql server (sqlexpress) it say

"The request failed or the server did not respond in timely fashion. Consult the error or other application error log"

I get a different error when I try and start the SQL server (sqlexpress) in the Sql server 2005 surface interface configuration tool the error is:

"An error occurred while performing this operation"

I then get this error when I try and start SQL SERVER (SQLEXPRESS) in the services tool

"The SQL SERVER (SQLEXPRESS) on your local computer started and then stopped. Some service stop automaticly if they have no work to do, for example, the performance log."

Now when I try and connected to the sql server Management studio express I get this error

"An error has occured while establishing a connection to the sql server. When connecting to SQL sever 2005, this failure may be caused by the fact that the default setting sql server does not allow remote connections. (provider, name pipes provider, error: 40 - Could not open a connection to sql server) (microsoft sql server Error: 2)

Which is the same error I get when I try an use one of my websites which interacts with an sql server 2005 express database.

So what have I tryed so far to fix this problem, well I have enable TCP/IP and Name pipes in the sql sever configuration manager under SQL server 2005 network configuration / protcols for sql server express

I have also set up the sql server browser to automatic which is working fine.

I have setup sql server (slqexpress) to manual and that still switch off like above. There seems to be lots of people out there with this issue.

WHAT I AM TRYING TO FIND IS A WAY OF STARTING SQL SERVER USING THE COMMAND PROMPT?????

I need to sort this problem out ASAP.

Does anyone know how to do this??
# June 25, 2006 8:37 AM

Nam said:

Hi Ming,

I think Sunu is referring to my post on 6/21/2006 immediately above his. Let me know if you need any more information.  I have found several forums posting similar errors however have not found a solution to it yet :( Let me know if you would like any additional information ...also i would like to remove the comment that removing netbios helps...it seems like maybe i just had a lucky streak cause the errors are persisting.  It seems so random. It doesn't coincide with backups or dbcc commands that we're running and the machine isn't being stressed at all....

plz help
# June 26, 2006 9:29 AM

Nam said:

In response to thomas' post
NET START MSSQLSERVER
NET START SQLSERVERAGENT
also note that if you start SQLSERVERAGENT that it will automatically attempt to start the dependant service MSSQLSERVER

Also i see the improper switching to be a result of the errors not a cause... I have found that sometimes when i get this error my cluster service will be unable to communicate with SQLServer (even though it's on the same machine) and restart the sql service if it can't connect in a reasonable amount of time.


# June 26, 2006 9:46 AM

SQL Protocols said:

Hi, Thomas

1)
   By default SQL Express was installed as a named instance, you can find useful info by following the blog:
   http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx

2)From command line, you can use

net start MSSQL$SQLEXPRESS, since the instance name is fixed for sql express.

Or you can go to services.msc, find MSSQL$SQLEXPRESS, do start/stop/restart..

Good Luck!
Ming.
# June 26, 2006 12:38 PM

SQL Protocols said:

Hi, Nam

   From your description, this looks like not a cluster issue. The error you saw probably is due to server close the connection, could you check server errorlog or system event log see whether there is any useful info to provide clue?

Also, we need more detail info about your scenario to identify the problem, could you help follow the below guidline and post your answer to the question?

http://blogs.msdn.com/sql_protocols/archive/2006/04/21/581035.aspx

Thanks!
Ming.
# June 26, 2006 11:45 PM

Thomas said:

Hi All

I fixed the problem I unistalled sql server 2005 express and reinstalled everything is working fine now. Thanks for the advice. Keep up the good work

regards.
# June 27, 2006 7:17 AM

Nam said:

Thanks ming I checked the system Logs and there are a couple of errors that happen around the same time but they don't always happen...

Application popup: Windows - Virtual Memory Minimum Too Low : Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied. For more information, see Help.

The browser service has failed to retrieve the backup list too many times on transport \Device\NetBT_Tcpip_{2367FB22-08A8-453D-9814-778CBC0FFB4D}. The backup browser is stopping.

In light of the paging file i have expanded it to the recommended size on from the OS which is quite large.. 48898MB....we have 32Gigs of ram on this server. Let me know if that's overkill.  I read somewhere that recommended is about equivilant to how much ram you have.

Hope this works...just in case :D

[1] Client side:
  1. What is the connection string in you app or DSN?
jdbc:inetpool:inetdae7a://serverName?user=User&password=*******&appname=AppProcess&database=DBName
  2. If client fails to connect, what is the client error messages? (please specify)
Typically only fails to connect during the minute or two when the errors are happening.
Also if the errors cause a sql server reboot then it will get an error message stating such.

com.nprise.dao.DaoException: com.inet.tds.s: java.net.ConnectExceptionConnection refused

com.nprise.dao.DaoException: com.inet.tds.s: Msg 6005, Level 14, State 2, Line 1, Sqlstate 01000
[DIDATABASE1]SHUTDOWN is in progress.

  3. Is the client remote or local to the SQL server machine? Remote
  4. Can you ping your server? YES
  5. Can you telnet to your SQL Server? YES
  6. What is your client database provider?  merlia java database driver Or/And, what is your client application? SQL Management Studio, Query Analyzer
  7. Is your client computer in the same domain as the Server computer? Same Domain
  8. What protocol the client enabled? TCPIP
  9. Do you have aliases configured that match the server name portion of your connection string? YES



[2] Server side:



  1. What is the MS SQL version? SQL Server 2005 x64
  2. What is the SKU of MS SQL? Standard
  3. What is the SQL Server Protocol enabled? TCPIP, NamedPipes
  4. Does the server start successfully? YES
  5. If SQL Server is a named instance, is the SQL browser enabled? YES
  6. What is the account that the SQL Server is running under? Domain Administrator
  7. Do you make firewall exception for your SQL server TCP port if you want connect remotely through TCP provider? NA
  8. Do you make firewall exception for SQL Browser UDP port 1434? NA



[3] Platform:

  1. What is the OS version? Windows 2003 x64
  2. Do you have third party antivirus, anti-spareware software installed? NO



# June 28, 2006 12:05 PM

Ritu said:

Hi,
I'm getting error msg:(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) while using webparts in my web app.I guess this has something to do with the point that connection string while connecting with aspnetdb in case of web parts uses windows authentication.
I'm also not able to connect to any other db if i use windows authentication in my connection string.
Can u plz suggest me any solution for it?

Thanks
Regards,
Ritu
# June 29, 2006 3:15 AM

SQL Protocols said:

Hi, Ritu

   Can you provide the connection string? Please following the below blog and search the error message to see the troubleshoot tips.

http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx

Good Luck!
Ming.
# June 29, 2006 1:36 PM

SQL Protocols said:

Hi, Nam

   Thanks for your detail info.
   So,

   First, it is remote connection, how do you telnet? telnet <server> <sqlport>? If your sql instance is a named instance, you should go to server errorlog to check server TCP/IP was enabld and listening on which port;  if your sql instance is default instance, you just try port 1433. Did you try to telnet the correct port? Plus, the <server> must be the hostname of your remote server.

 Secondly, if your sql instance is named instance, did you specify the instance name in your connection string? Normally, you should specify "<remoteserver>\<instancename>"

 Thirdly, you mentioned you specify the alias, how does it looks like? did you make connection by using alias or use "<servername>\<insatncename>"? Please double check whether you spcify the correct sql port number in your alias, that might cause client connect to a tcp port that sql instance was not listening on.

Fourthly, to make remote connection and your remote server has firewall enabled, you need add sql port and browser udp port to the exception list, so, either you add sqlservr.exe and sqlbrowser.exe to exception list or edit the port directly to the exception list. After this done, see whether you can make connection.

Finally, for a quick workaround is by specifying the port number in your connection string, namely, "<servername>\<instancename>,<sqlport>", on your server " netstat -ano |findstr <sqlport> " to see server was listening on the port.

Let me know if you have further question.

Good Luck!!
Ming.

 
# June 29, 2006 1:55 PM

rape movies said:

Asaspal. Memrano tu es besta. Amigo.
# June 30, 2006 5:40 AM

Nam said:

Hey Ming,

default port and default instance also i can telenet into the machine. Not using an alias just the virtual server name that we set up with the cluster.  Also no firewall everything is connecting from in the same domain.  

The problem isn't that we can't connect, we can connect 99% of the time. It's just that about once a day we lose connection for about 1 minute and get the errors listed above.

Also since i expanded the page file the problem still persists. :(
# June 30, 2006 9:31 AM

Brian said:

Hi

I fixed my error 40 by turning off user instances and re editing the connection string in my C# project.

Hope this helps.
# June 30, 2006 2:40 PM

SQL Protocols said:

Hi, Nam

   One way to identify the 1% connection lose is to open SQL trace file, and see when you got repro, what operation are your client app doing and what was going on on the server...

Thanks!
Ming.
# July 3, 2006 2:22 PM

rape videos said:

Your article is quite right, thanks.
# July 5, 2006 9:10 AM

jmcnamera said:

Changing the OSQL command switch from -S to -s -S fixed this issue for me.  Not sure why, but with -S server\instance we got the can't find instance error message but with -s it worked.

Thanks to SqlRick who pointed this out early in the thread.
# August 1, 2006 2:24 PM

Kamate said:

hi ming,
I am getting the error pasted below when I connect to SQL express with SQL server authentication.
Can u plz help?
TITLE: Connect to Server
------------------------------

Cannot connect to PS0654\SQLEXPRESS.

------------------------------
ADDITIONAL INFORMATION:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
# August 10, 2006 10:42 AM

Kamate said:

Hi Ming,
This is further to my previous query,I get the following error when i try to login with sa.

Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)

Thanks
# August 10, 2006 10:45 AM

SQL Protocols said:

Kamate,
  "Cannot connect to PS0654\SQLEXPRESS. .."
Mostlikely, this is because you are connect to the SQLExpress remotely and the remote protocol is not enable for sqlexpress. Please use SQL Server Surfuce Configuration Tool to enable remote protocol.

  "Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)"

What is you connection string, you can either use SQL login with UID and Password or use windows integrated authentication, not both. Make sure that SQLExpress authentication mode is "mix" and you have correct SA password is you decide to use SQL login.


# August 10, 2006 2:25 PM

Ramesh Babu V said:

Strange might it sound that, I have this issue with the SQL server connectivity from the .net application. The application seems to connect fine fromthe staging system. but throws up an exception from the development

Error number  : 18452
Error : User not associated with the SQL Server trusted connnection..

Checked for the authentication its configured to mixed as mentioned in the microsoft website.  Is there any other option i am missing here for i am getting this error????

# August 11, 2006 7:06 PM

Charlie B said:

"Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)"

I have the same problem -- how does one specify "mix" for SQLExpress authentication mode? I already allow both remote and local connections  via the Surface Area Configuration -- and "Using both TCP/IP and Named Pipes" is set.

# August 13, 2006 2:02 PM

masaki said:

In SQL Server Management Studio, when I tried to connect to the Analysis Services database located on a remote server, it gives me the following error:
A connection cannot be made.  Endure that the server is running.
(Microsoft.AnalysisServices.AdomdClient)

Additional Information:
-- Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. (System)
 -- An existing connection was forcibly closed by the remote host (System)

What should I do?  

Thanks.
# August 16, 2006 12:31 AM

SQL Protocols said:

Hi, masaki

   The error indicated that
1) you might have no TCP protocol enabled on remote server, double check SQL configuration manager, see whether remote server was successfully started.

2) See server error log, check which tcp port server is listening on? Try telnet <remoteserver> <port>, and double check whether the port was added to firewall exception list.

3) Try osql /S<remoteservername>,<port> /E, see whether it works? If so, open trace file see what operation cause server reset connection, and see eventlog and server errorlog to get clue.

Good Luck!
Ming.
# August 16, 2006 10:39 PM

SQL Protocols said:

Hi, marsaki

   I read some discussion about AS issue, so, here I collect helpful troubleshooting tips from those:

1)Is this AS 2K or AS 2005?
2)Have you enabled AS to accept remote connections (SAC utility - 2005)?
3)How do you make connection? You connected through DNS name?
4)Did you try ping your AS server or ip?
5)Can you double check the following registry key?

A. Locate the following key in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa


B. Does this exist?

Value name: DisableLoopbackCheck

Data type: REG_DWORD

Radix: Decimal

Value: 1


Good Luck!
Ming.
# August 16, 2006 11:01 PM

Sergey said:

OLE DB Provider returns error “General network error (80004005)” – Communication link failure when Job scheduler runs long taking DTS package via TSQL command. DTS package makes UPDATE against big table. This error can issue any time during long taking UPDATE. We have
Win2k3 sp1 64-bit for IA, SQL 2005 EE 64-bit for IA.
# August 18, 2006 7:26 AM

SQL Protocols said:

Hi, Sergey

   Could you try enlarging query timeout?
# August 19, 2006 7:54 PM

Sergey said:

Thank's a lot for you answer!
We increased "general timeout" and "connect timeout. SQL server still drops local connection. We can see in server error log next record:
Date 21.08.2006 12:39:20
Log SQL Server (Current - 21.08.2006 12:51:00)

Source spid60

Message
A fatal error occurred while reading the input stream from the network. The session will be terminated.
# August 21, 2006 5:12 AM

SQL Protocols said:

Hi, Sergey

   This is because your client send invalid request and got rejected by server. Could you describe more spcifically what you did?

1) what is your client provider?
2) what is your server, sql 2k5 or 2k?
3) what is your client request?

You can turn on sql trace to see which client operation caused this failure?

Also, from error log, you should be able to see the error state, can you provide it?

Thanks!
# August 21, 2006 11:18 PM

M.Seenuvasan said:

Hi i am new member of this fourm.I am also geting the following problem,Kindly help me to solve the problem

Problem:

I am developing one web application with vb.net, we have uploaded our pages in online with the sqlserver version 7. But some pages only showing the following error while view the page.But the online sql server also showing the same version.That we tested. Kindly help to solve the problem and aslo let me know how to post new topic.

Error:

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)

# September 4, 2006 2:25 AM

SQL Protocols said:

Hi,

 Please see the following blog to troubleshoot error 40:

 http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx

If you still face problem, please go through our questions w/ connectivity issue:

http://blogs.msdn.com/sql_protocols/archive/2006/04/21/581035.aspx

Thanks!
Ming.

# September 6, 2006 12:44 PM

Chandan said:

Hi,

I am trying to establish the Database Mirror with Sql server 2005. I am trying to configuring it with witness. I am getting error while clicking on start mirroring button as follows
"The server network address "%.*ls" can not be reached or does not exist. Check the network address name and reissue the command".
I am trying to use certificate based authentication. Please advice.

Regards,
Chandan
 
# September 13, 2006 12:04 PM

DOGAD DOGOUI said:

j'install actuellement une application et je dois créer une base de donnée à partir d'un script. mais quelle a été ma suprise quand je me suis rendu compte que cette la connexion a SQL 2005 n'arrivait pas à s'etablir: message d'erreur: POUR VOUS CONNECTER A CE SERVEUR VOUS DEVEZ UTILISER SQL Server Management Studio ou SMO. or tenez vous bien j'arrive a me connecter à SQL 2000 avec les même  parametre. bon sang SQL 2005 est très...... HELP ME
# September 13, 2006 5:33 PM

SQL Protocols said:

Pouvez-vous nous donner un exemple de la corde de raccordement que vous employez et le message d'erreur exact avec le nombre exact d'erreur ? Il pourrait être possible que le SQL ne soit pas installé pour écouter sur les raccordements à distance. Si c'est un raccordement à distance vous devrez permettre la connectivité à distance en utilisant le magicien de configuration de superficie.

Si vous pouvez me montrer le code ou le script où vous essayez de vous relier je peux pouvoir aider.

C'est un problème avec le SQL ne permettant pas les raccordements à distance ou un problème avec de la votre corde de raccordement. Ceci travaillé avec SQL 2000 ainsi qu'il devrait fonctionner avec 2005 si des raccordements à distance sont permis.

excuses pour mon Français faible

Brad Sarsfield
Microsoft SQL Server
# September 13, 2006 6:07 PM

Firoz Ahmad Khan said:

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)"}

plz help i think this is very common error when we connect .net(2005) fron 2000 sql server database
# September 18, 2006 7:03 AM

SQL Protocols said:

Hi, Firoz

   Please refer following blog to troubleshooting your problem:

   http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx

Good Luck!
Ming.
# September 18, 2006 1:21 PM

Firoz Ahmad Khan said:

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)
# September 22, 2006 6:53 AM

LocoTx said:

Jinn,

Error code 53 often indicates that the server is not reachable from the client machine.  If you run the following two commands on the client machine, what do you get (I assume the server is installed as a default intsnace):

telnet <serverMachineName> 1433

ping <serverMachineName>

THIS WAS A LIFE SAVER !!!

Turns out our DNS was not resolving to the correct IP address.  Although my web.config said "Server=Web4"

When you pinged it went to the wrong IP.

DO THIS FIRST !!!

# October 5, 2006 11:38 AM

Jeremy said:

Hi Ming,

I hope that you can help, having no luck with a 2005 connectivity issue.

I've installed SQL2005 on a server already running SQL2K. SQL2K is the default instance, so I'm trying to connect to SQL2005 using MYSERVER\SQL2005 as the instance.

The steps that I've taken are to apply SP1 and enable remote connections (TCP & Named pipes). I've also made sure the SQL Server Browser service is running and enabled.

The error message that I get via SQL2005 client tools is "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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)"

I can connect to Analysis Services, using SERVERNAME\SQL2005, if that helps.

I dont see anything stange in the error logs, looking under Management->SQL Server Logs.

Do you have any ideas?

Many thanks

Jeremy

# October 16, 2006 8:26 AM

ratheesh said:

How  to correct sql server 2005 Error No :40

# October 26, 2006 6:28 AM

Denis said:

Hi,

I am unable to connect to my SQL Server Express engine with the SQL Server Management Studio Express, although it works with ODBC. I am working on the very same server.

When I connect with WinSQL using ODBC, everything is fine. When I try connecting with Mgmt Studio Express, I get the typical Named Pipes Provider, error 40: ... SQL Server, error 53.

This used to work before. I installed a TV tuner and got a MS Video network adapter (whatever it might be). It is disabled now and pinging (it's localhost anyway) works. Telnet shows no reaction.

I have a netstat showing the SQL server listening on 0.0.0.0:1433. The firewall log does not show any connect attempt (it is still localhost).

The only thing I haven't tried yet is connecting from another computer. Since ODBC does work, my guess is that the Mgmt Studio is giving the trouble, since the service is working.

Any hint?

Thanks,

# October 29, 2006 5:48 PM

Linkin said:

Please somebody help me,i install sql server 2005 in local machine but no servers name are avaible to me,and when i try to connect to (local),the error shows to me:

TITLE: Connect to Database Engine

------------------------------

Cannot connect to sqlserver2005.

------------------------------

ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: 53)

Please someone help me,in configuration manager i dont see any instances....whats wrong?!?!

# November 2, 2006 8:58 AM

twentzler said:

I need help with this error.

A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

I went to Ming's links and did not find help there so I came back here.  I read this error is typically indicating problems with the underlying network infrastructure... OK.  How ever this is SQL express standing alone on a laptop.  I have one dB one SQL  one laptop no network involved. Since it has been working fine for 19 months I am thinking system resources of some kind. Performance, memory, size of dB something like that.  I have ompletely re-installed everything from the OS on up. I do not really know where to go from here.

Any help would be appreciated.

Tracy

# December 7, 2006 12:21 PM

rajiv said:

Error: the request failed or the service did not respod in a timely fashion. Consult the event log or other applicable or other applicable error logs for details.

# December 18, 2006 9:40 AM

vin said:

Cannot connect to PNES014\SQLEXPRESS.

------------------------------

ADDITIONAL INFORMATION:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)

# December 21, 2006 7:05 AM

Pradyuman said:

TITLE: Connect to Server

------------------------------

Cannot connect to mssql8.3essentials.com.

------------------------------

ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: 53)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476

------------------------------

BUTTONS:

OK

------------------------------

# December 27, 2006 12:44 AM

SQL Protocols said:

Hi, vin

   The error you saw either because the reason described in the following blog:

http://blogs.msdn.com/sql_protocols/archive/2006/07/26/678596.aspx

Or because of under high CPU consumption.

Good Luck!

Ming.

# December 29, 2006 2:06 AM

Rohit said:

One thing that I tried to do when I got this error message "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)"

is increase the timeout duration to 60 instead of 15 seconds. It worked in my case, and I was able to connect to some other SQL Server DB.

# January 16, 2007 9:28 AM

Jeronimo said:

Hi,

I tried to use SQLCMD to run a sql script. But unfortunately I get the folowing message when I press enter after SQLCMD in a DOS box.

Named Pipes Provider: Could not open a connection to SQL Server [2].

Sqlcmd: Error: Microsoft SQL Native Client : 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..

Sqlcmd: Error: Microsoft SQL Native Client :

Login timeout expired.

This is on a server running SQL 2005 Express.

# January 17, 2007 2:47 AM

Joel said:

I am trying to insert a 450 meg file into a table across a linked server and the insert fails. I am getting the following error message:

A fatal error occurred while reading the input stream from the network. The session will be terminated.

The insert works fine on files under 250 megs. Also, the file can be inserted when done locally. But across the network on a linked server, it fails. Any ideas?

# January 17, 2007 1:11 PM

Peter said:

Jeronimo,

Error code 2 usually means one of two things:

(1) The target server does not have Named Pipes enabled.  

(2) The server name specified is incorrect.  

What is the exact SQLCMD command you use (replace any confidential information)?  

Answer to the checklist from http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1 may help as well.  

# January 17, 2007 3:25 PM

Peter said:

Joel,

What client driver/provider you use (MDAC ODBC, OLEDB, SQL Native Client, managed SqlClient, JDBC, ...)?  

Can this be a time-out error retrieving the data?  

# January 17, 2007 3:27 PM

SStark said:

I installed SQL Server 2005 Express on a Windows 2000 platform and, without changing any of the defaults, the SQL Server Management Studio functioned properly.  However, after uninstalling and re-installing SQL Server 2005 Express, I keep getting the infamous "(provider: TCP Provider; error: 0 - No connection could be made because the target machine actively refused it.)(Microsoft SQL Server, Error: 10061)"

From reading the various comments presented here, I assumed that the problem was because the default settings disable TCP and named pipe connections.  I used the SQL Server Surface Area Configuration tool and enabled all of the access methods (TCP and Named Pipes) for both local and remote connections.  The results were the same.

I checked the log file and it shows the following:

Server is listening on [ 'any' <ipv4> 1457].

2007-01-17 09:26:21.85 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].

2007-01-17 09:26:21.85 Server      Server named pipe provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].

What I really don't understand is why the Server Management Studio tool is attempting to connect using TCP instead of shared memory.

I would appreciate any suggestions as to where I go from here.  

# January 17, 2007 6:41 PM

SStark said:

I installed SQL Server 2005 Express on a Windows 2000 platform and, without changing any of the defaults, the SQL Server Management Studio functioned properly.  However, after uninstalling and re-installing SQL Server 2005 Express, when I try to connect to the SQL Server, I get an error; "(provider: TCP Provider; error: 0 - No connection could be made because the target machine actively refused it.)(Microsoft SQL Server, Error: 10061)"

From reading the various comments presented here, I assumed that the problem was because the default configuration settings of the SQL Server disable the TCP and Named Pipe network protocols for remote connections.  I used the SQL Server Surface Area Configuration tool and enabled the access methods (TCP and Named Pipes) for both local and remote connections.  The results were the same i.e. no connection to the SQL Server could be made and the error 10061 message was displayed.

Using the Server Configuration Manager tool, I changed the default protocol for the server aliases to Named Pipe from TCP.

I stopped and started the SqlServer.  I then  started the SQL Server Management Studio tool and tried to connect to the database engine.  I specified the Named Pipe as the Network Protocol in the Options tab of the Connection dialog box.

This time, I observed a different error "(provider: Named Pipes Provider; error: 40 - Could not open a connection to SQL Server.)(Microsoft SQL Server, Error: 2).  

I checked the log file and it shows the following:

Server is listening on [ 'any' <ipv4> 1457].

2007-01-17 09:26:21.85 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\SQLEXPRESS ].

2007-01-17 09:26:21.85 Server      Server named pipe provider is ready to accept connection on [ \\.\pipe\MSSQL$SQLEXPRESS\sql\query ].

It appears as though the settings in the Server Configuration Manager for the Client protocols (allowing remote access) are not affecting the SQL Server.

This is getting a little weird.  

# January 17, 2007 10:46 PM

SStark said:

While troubleshooting problems with connecting to the SQL Server Database Engine, I discovered the following error reported during installation in the SQLSetup[xxxx]_[ComputerName]_Core.log file:

Running: OpenPipeAction at: 2007/0/16 18:43:0

Complete: OpenPipeAction at: 2007/0/16 18:43:0, returned false

Error: Action "OpenPipeAction" failed during execution.

Running: CreatePipeAction at: 2007/0/16 18:43:0

Complete: CreatePipeAction at: 2007/0/16 18:43:0, returned false

Error: Action "CreatePipeAction" failed during execution.

Action "RunRemoteSetupAction" will be skipped due to the following restrictions:

Condition "Action: CreatePipeAction has finished and passed." returned false.

I can't find any explanation of what would cause the CreatePipeAction to fail.

Any assistance would be appreciated.

# January 17, 2007 11:28 PM

SQL Protocols said:

Hi, SStark

   Thanks for the detail info.

   From the error message that you tried NP connection, seems your sql server not start or you connect to a wrong instance.

   1) Were you making remote connection? If so, did you make "File and printer sharing" and tcp port:1457 in Firewall exception list on the servre box?

   2) can you try telnet <ipofserver> 1457, succeeded?

   3) can you try "osql /S\\<servername>\pipe\SQLLocal\SQLEXPRESS /E", if local connection, <servername>="."; else, put real machinename.

   4)In your connection string, did you specify the instance name? like make connection use osql /S.\sqlexpress /E for local conn.

osql /S<machinename>\sqlexpress /E

   5)But as you mentioned setup issue, please first double check status of the running instance"

sc query mssql$sqlexpress".

Also, check out the following blog for making connection to sqlexpress.

http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx

Good Luck!

Ming.

# January 18, 2007 2:04 AM

Joel said:

The linked server is using provider SQL Native Client, SQLNCLI, with allow inprocess checked.  Also I was able to manually move a file(over 250 mb) by directly logging on to the box and mapping a drive to the other boxe (rules out a network restriction).  Finally both servers are set with allow remote access, and the connection timeouts are maxed.

# January 18, 2007 10:14 AM

Joel said:

Heard from Microsoft today, Linked servers have a size maximum of 255MB. Meaning you can pass data (in a variable) larger than 255MB over a linked server.

# January 22, 2007 1:15 PM

Joel said:

Sorry Typo

Meaning you cant pass data (in a variable) larger than 255MB over a linked server.

# January 22, 2007 1:19 PM

R Klio said:

Hi everyone,

I've got problem querying remote tables via a specific linked server.

The server from which I execute the query is an SQLServer2005 and the linked server is an SQLServer2000.

If I do select * from <linked server>.<database name>.<db owner>.<Table1>  after a while I get the following error message

"Server: Msg 10054, Level 16, State 1, Line 0, TCP Provider: An existing connection was forcibly closed by the remote host."

I execute the query using profiler and I got the following profiler error: 'OLE DB provider "Unknown" for linked server "(null)" supported the schema lock interface, but returned "0x80040e96" for "ReleaseSchemaLock".' (The query returns a subset of records before it is forcibly stopped)

The strange thing is that i used to run the same query a week or two ago and faced no problem.

Please help.

# February 14, 2007 7:02 AM

Shum said:

Hey guys!!!

Please help me with this, when i try to import a database made in access to sql server 2005 i get the following error....

TITLE: SQL Server Import and Export Wizard

----------------------------------------

The SSIS Data Flow Task could not be created. Verify that DTSPipeline.dll is available and registered. The wizard cannot continue and it will terminate.

----------------------------------------

ADDITIONAL INFORMATION:

Value does not fall within the expected range. (Microsoft.SqlServer.DTSRuntimeWrap)

----------------------------------------

BUTTONS:

OK

----------------------------------------

It worked fine, but i had to uninstal SQL and when i installed again i came across this problem....

# February 28, 2007 3:25 AM

Shum said:

plz plzzzz... do resolve this issueee .. ive two months for the project and im stuck with this thing for the last 2 weeks at initial stage.

# February 28, 2007 4:12 AM

Matt Neerincx (MSFT) said:

I would post this to the sql server SSIS newsgroup, they would be more helpful here ->

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=80&SiteID=1

# February 28, 2007 11:02 AM

Minaz Amin said:

We have setup remote peer to peer replication SQL Server 2005 SP2.

I have already enabled the

1. TCP/ IP in both the Server

2. Browser Service is running

3. Remote connection is enabled

4. Added the Server name in the HOST file.

5. Can ping / Telnet both the server.

6. Added the DWORD in the resgistry as setup readme for windows 2003 SP1 connection issue.

Still I have facing the same issue and not able to replicate the database.

Plaese give me a solution. This is an urgent issue.

Regards,

Minaz Amin

# March 6, 2007 9:22 AM

Kevin O said:

I've installed Vista on my laptop and I installed SQL Server 2005. I'm connected to a VPN at the University I attend. I'm trying to connect to the universities server at the SQL Server connection page and I get the following error:

Login failed for user ''. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider).

Any ideas on this?

Thanks,

Kevin

# March 6, 2007 7:44 PM

DarkNite said:

Hi Nam and or Ming (or anyone),

Did you ever figure out Nam's problem?  I'm also getting sporadic connection errors.  They seem to happen most often when the workload is a little heavier, but I'd be shocked if it's a worker thread issue.

We get the errors from SQL Agent jobs, remote Java batch jobs, and from a third party replication tool (Data Mirror).

Thanks, Bill

# March 7, 2007 4:33 PM

Kelli said:

I get the following error:

Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2

I have set up remote connections and have set up Windows Firewall exceptions  (per knowledgebase).  I've also named the TCP_All port 1433, and set the server for mixed authentication but the server won't connect. (It did when it was Windows Authentication only, but now it won't connect for me to change it back.) I'm trying to use with Cognos8 on my laptop.  The SQL browser connects fine, and the SQL Reporting Services connects fine, but the server itself obstinately refuses.  I could really use some help.

Thanks, Kelli

# March 11, 2007 6:42 PM

Matt Neerincx (MSFT) said:

Go to the server cmd prompt and run:

  netstat -aon | findstr 1433

Ensure that SQL Server is listening on 1433.  You should see something like:

TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING 1234

Where 1234 is process ID of SQL Server.

Then on server run:

   telnet localhost 1433

If this connects, press Ctrl+] then type quit to exit telnet.

Now do the same telnet remotely, if this fails then your port is still blocked.  If it works, then you should be able to connect.

# March 11, 2007 7:12 PM

melroxanne said:

so i hear all this talk about changing the default to allow remote servers but

HOW ON EARTH DO YOU DO IT!!!!!!!!!!!!!I can't connect to my server at school and it's an online class.   PLEASE HELP

# March 12, 2007 2:23 AM

Matt Neerincx (MSFT) said:

If you have SQL Server installed you should see an icon called SQL Server Surface Area Configuration.  If you don't see the icon look under ->

C:\Program Files\Microsoft SQL Server\90\Shared\SAC.EXE

Run this executable to launch the program, then click on the link "Surface Area Configuration for Services and Connections".  Drill down the tree under your instance name (MSSQLSERVER is the default instance) then

Database Engine then Remote Connections and select the options you want here and press OK.

# March 12, 2007 12:50 PM

... said:

Du musst ein Fachmann sein - wirklich guter Aufstellungsort, den du hast!

# March 14, 2007 3:28 PM

DarkNite said:

For those of you having the intermittent connection problems, this link may be helpful:  http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=620912&SiteID=1.

So far, giving the SQL Server service accounts the Windows permission to lock pages in memory has stopped our problems.  Even domain accounts with admin rights don't have this permission by default.

Of course, rebooting the nodes in our cluster may also be the reason we haven't seen any connection errors today.

# March 14, 2007 5:54 PM

mary said:

hiiiiiiiii,

    when i am connecting the sqlserver in windows application , it not given any error. but when i am connecting the sqlserver in windows application, it given the error, "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)".

plz help me to solve the problem.

Thanks

regards

MMary

# March 15, 2007 1:04 AM

StuBeDo said:

Hi

I have the error:

"TITLE: Connect to Server

------------------------------

Cannot connect to "SQL Server Name".

------------------------------

ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: 53)

------------------------------

BUTTONS:

OK

------------------------------

"

I can ping to the machine name and ip ok. Remote connections are allowed on the SQL server instance. I can login locally to the SQL server.

sqlcmd -S "sqlservername" -E gives the following error

HResult 0x35, Level 16, State 1....

Any ideas how to reslove this

# March 27, 2007 10:10 AM

muhammad fahad masud said:

TITLE: Connect to Server

------------------------------

Cannot connect to FAHADMASOOD.

------------------------------

ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: 53)

i am recieving this error however i m not connected to any network i m running sql server 2005 on my pc and recieving this error plz kindly tell me how can i resolve this error

# April 13, 2007 3:16 AM

vinay said:

After restoring the Database using SMO (from code), when I try to execute any sql statement on the restored DB, I get the following error :

A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

Could you please help me out on this ???

# April 13, 2007 9:46 AM

Matt Neerincx (MSFT) said:

First thing I would do is check the SQL Server ERRORLOG.  This could be a sign of a corrupted database, try connecting to the server and running dbcc checkdb on the database.

# April 13, 2007 11:30 AM

shari said:

Connection::Open failed 0x80004005

We are running a POS application on SQL 2005 and are unable to open the application database.  The error we are getting is above.

URGENT help

# April 21, 2007 2:57 PM

Dario Columbich said:

I have windows vista, sql server 2005 express, vb express and there is not chance to connect to a database from the database explorer. I have not problem to connect from Management Studio, but whenever i wanted open a connection arise a message telling me that there is need to ask permission to owner or administrator, i have windows authentication and i am the only user (the administrator).

# April 23, 2007 12:57 PM

Matt Neerincx (MSFT) said:

Could you post back with the exact error message?

# April 23, 2007 2:38 PM

Sergeir said:

Error in SSIS:

Error: 0xC0202009 at QR_OrderItem Insert, UPDATE QR_OrderItem [440]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.

An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Login timeout expired".

An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "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.".

An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "TCP Provider: Only one usage of each socket address (protocol/network address/port) is normally permitted.

# April 27, 2007 12:41 PM

Chakravarthy said:

I have created a linked server and but when i am trting fetch some data, it is returning the following error message.

could u please help me on this?

OLE DB provider "SQLNCLI" for linked server "ReportProd" returned message "Unable to complete login process due to delay in opening server connection".

OLE DB provider "SQLNCLI" for linked server "ReportProd" returned message "Invalid connection string attribute".

Msg 7303, Level 16, State 1, Line 1

Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "ReportProd".

# May 1, 2007 5:00 AM

Vipin said:

Hi,

I have enabled all the TCP/IP services and also added the sqlserver.exe and sqlbrowser.exe to the firewall and restarted the SQL server. But i am still unable to connect with the remote database.

It is still showing error;

provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

I am using SQL server 2005 Express with Windows XP.

Please help me out with this problem.

# May 9, 2007 2:08 AM

Jim Browsant said:

That worked. Thank you

# re: SQL Server 2005 connectivity error messages

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) (Microsoft SQL Server, Error: 2)

to correct this error in SQLEXPRESS on servername use [servername]\sqlexpress, this should work

Monday, February 13, 2006 2:04 PM by Vitgar

# May 30, 2007 11:06 AM

Lucky said:

remove the Port numbers specified in the connection string.

# June 1, 2007 3:16 PM

Fred said:

Current, I have this problem:

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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)

After I installed SQL 2005 Express in Server 2003, I made firewall and SQL server setting and it works well without any problem from remote site. However, next day morning, when I try to connect it, it gives above error.

Current I can connect SQL server in local computer. I can connect web server from remote site without any problems. And I also can use remote desktop access.

Any helps is welcomed.

# June 2, 2007 11:57 AM

MANISH said:

I am calling extened stored procedure through stored proc in sql 2005. In one machine it works properly where as in another machine it gives an error saying that "Msg 233, Level 20, State 0, Line 0

A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)"

Environment:

Windows 2003 image with Sql 2005 in VMWare Workstation.

Do we required any specific credential to run extended strored proc in sql 2005 or is it a problem bcoz of some sql setup.

please do the needful.

Note: The same extended stored proc is working fine in sql 2000.

Thanks,

Manish Jha

# June 5, 2007 9:04 AM

Prabal said:

I'm having a big problem with a SQL 2K5 cluster (using standard edition, SP1). I can get onto the box and connect to the sql server locally fine. However when I try to connect remotely I get errors. I've read all the above advice and my problem is that I definitely have got remote connections enabled, and sql browser running, and our NT/networking people are positive that there are no firewalls etc involved. I've also tried hardcoding the IP address in the client network utility entry, just using <ip address>, port number as well as trying hostname\instance name, port number. The other odd thing is that the remote connectivity was originally working fine but just seemed to stop working the next day! I've built several non-cluster sql server 2005's and never had this problem with them.

Let's call the two sides of the cluster, CL1 and CL2 and the "virtual server" is CL3. Locally I can connect without any problem at all to the SQL server, but I just can't connect to it from any remote machine.

The server in question is instance name LMS_PRD running on CL3, port 10051. TCP/IP is definitely enabled for local and remote connections (I have checked this in the SQL server surface area configuration). I can connect locally without any problem. Also, locally, if I do,

telnet CL3 10051

it connects fine

From a SQL 2000 box - when I try to connect from sql query analyzer, I get

"Unable to connect to server LMS_PRD Server Msg 17 ... SQL server does not exist or access denied"

Client network utility shows server alias - LMS_PRD, TCP/IP, CL3\LMS_PRD,10051

[I can connect to other SQL 2005 servers OK from this same server using this same method]

On this box, when I do telnet CL3 10051 , I get "Connecting to CL3...Could not open a connection to host on port 10051 : Connect failed". (Same thing if I use the IP address).

[When I do a similar one for another SQL 2005 box, "telnet U01 10051", it connects fine]

From another SQL 2005 box - when I try to register the server, I get

"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: TCP provider, error 0 - No connection could be made because thew target machine actively refused it.) (Microsoft SQL Server, Error: 10061)"

IN the SQL native client configuration it shows alias name - CL3\LMS_PRD, server=CL3\LMS_PRD, protocol tcp, parameters 10051

Again if I do telnet CL3 10051, I get the error above.

From this same box I can register another SQL 2005 server without any problem and do the telnet to it OK

Just to emphasise:

(a) The SQL server configuration manager shows that TCP/IP is enabled, and that 10051 is the port (in IPALL, TCP port). Also I have checked the SQL server errorlog - it is definitely using 10051 as the port.

(b) The SQL server surface area configuration shows under local and remote connections using both TCP/IP and named pipes selected (I've tried both this and the using tcp/ip only option)

(c) SQL server browser is running

(d) There are NO firewalls etc involved

Any help or advice MUCH appreciated

# June 10, 2007 3:30 AM

Prabal said:

Finally got to the bottom of this. It suddenly occurred to me that I hadn't looked in the event log, so I had a look and lo and behold: there was an error that suggested that the virtual server's IP address was not unique on the network! Looks like some sort of solaris machine was using the same IP address. I've changed it (impressed how easy it was - just a setting from the cluster administrator) and now all connectivity issues are gone.

I suppose the moral of the story is always to check the system logs first!

# June 14, 2007 6:49 AM

Matthew Corneliu said:

TITLE: Connect to Server

------------------------------

Cannot connect to LITTLEANGLE\SQLEXPRESS.

------------------------------

ADDITIONAL INFORMATION:

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

------------------------------

BUTTONS:

OK

------------------------------

Hi. I'm not sure if that message waslisted or not. I keep getting this message and im not sure if im the only one.Th eprogram worked fine for about 2-3 days an this message just started poping i stop connecting.If possible help would be highly apprecited.

# June 19, 2007 7:34 PM

SQL Protocols said:

This message is discussed previously in this forum. Here are the suggestions:

Check whether

(1) The SQL Browser service is running on the server box.  

and/or

(2) The SQL Browser's UDP port 1434 is blocked by firewall.  You can grant exception either to UDP port 1434 or to SQL Browser process.  

If you are trying to remote connection to Sql Server 2005, you need to enable your TCP/IP Protocol in your SQL Server Configuration Manager.

SQL Server Configuration Manager

-> SQl Server 2005 Network Configuration

 -> Protocols for <instance>

After enabling the TCP/IP, you need to restart the SQL Server for the changes to take effect.

If these suggestions don't help, please provide more information about how you are trying to connect to SQL Server Express (local or remote connection, connection string, OS on client and server machines). Please also provide the most recent SQL Server ERRORLOG (from installed dir\LOG, e.g. Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG). I will be able to provide additional help once I know these details.

Thank you

Stoyko Kostov

# June 21, 2007 7:11 PM

vaibhav said:

login failed for user 'sa' the user is not associated with trusted sql srver conned\ction: mssql error 18452

# June 22, 2007 3:34 AM

Ryan Soe said:

An error has occured 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 setting SQL Server does not allow remote

connections.(provide:Named Pipes Provider,error:40-Could not open a connection to SQL Server)(Microsoft SQL Server,Error:1326)

I got this error when I connect to my SQL server from sql server client express edition which is run on Vista , Help me urgently

# July 18, 2007 4:34 AM

zdena said:

Hi guys, I have a problem with error: 40.

I made a Web page, and it works perfect on my local machine, everything is OK, until I uloaded page to the server, it reports this error:

ON MY LOCAL MACHINE EVERYTHING WORKS AS IT SHOLULD, BUT ONLINE WONT, PLEASE HELP

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)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[SqlException (0x80131904): 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)]

  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735091

  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188

  System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820

  System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628

  System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170

  System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359

  System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28

  System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424

  System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66

  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496

  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82

  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105

  System.Data.SqlClient.SqlConnection.Open() +111

  System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121

  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137

  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83

  System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770

  System.Web.UI.WebControls.Repeater.GetData() +50

  System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +232

  System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53

  System.Web.UI.WebControls.Repeater.DataBind() +72

  System.Web.UI.WebControls.Repeater.EnsureDataBound() +55

  System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +12

  System.Web.UI.Control.PreRenderRecursiveInternal() +77

  System.Web.UI.Control.PreRenderRecursiveInternal() +161

  System.Web.UI.Control.PreRenderRecursiveInternal() +161

  System.Web.UI.Control.PreRenderRecursiveInternal() +161

  System.Web.UI.Control.PreRenderRecursiveInternal() +161

  System.Web.UI.Control.PreRenderRecursiveInternal() +161

  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360

I dont't Know what to do. Please HELP!

--------------------------------------------------------------------------------

Zdena

# July 21, 2007 6:01 PM

Andrew said:

Hi guys,

I have a wierd one i'm afraid and can't seem to figure it out.

I am using 3 computers

1 - my own, from home - uses Vista ultimate and sql 2005 developer edition

2 - server at work, windows 2003 server R2 with sql 2005

3 remote server on windows 2003 and again sql 2005. i don't have physical access to this one. it's in a different country.

nr 1 and 2 are fine , can log in to each other , no problem whatsoever.

however when i try to connect from 3 to 1 or 2 it does not work. i always get this :

Error Number: 53

Severity: 20

State: 0

if i telnet using telnet ip 1433, it does not work. i get destination unreachable.

However if i ping them it works for both 1 and 2.

all computers are properly set up for remote connections with tcp ip and named pipes on. I am always using sa to login on all of them. I am trying to export data from server 3 which is a live server to 2 which is a development server.

I am afraid i have no idea what to try next. any clues ?

# July 30, 2007 10:58 AM

provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server said:

Hi all,

Please help me any one to resolve this error

as soon as possible post the solution for this perticular problem .

--------------------------------------------------------------

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)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): 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)]

  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123

  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188

  System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966

  System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109

  System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383

  System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181

  System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170

  System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359

  System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28

  System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424

  System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66

  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496

  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82

  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105

  System.Data.SqlClient.SqlConnection.Open() +111

  System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121

  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137

  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86

  Operation.ShowMainCategory() +99

  _Default.GetMainCategory() +69

  _Default.Page_Load(Object sender, EventArgs e) +21

  System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15

  System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34

  System.Web.UI.Control.OnLoad(EventArgs e) +99

  System.Web.UI.Control.LoadRecursive() +47

  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

--------------------------------------------------------

Thanking you ,

shubahm saurabh

shubahmsaurabh@gmail.com

# August 12, 2007 3:25 PM

provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server said:

Hi all,

Please help me any one to resolve this error

as soon as possible post the solution for this perticular problem .

--------------------------------------------------------------

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)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): 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)]

  System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123

  System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188

  System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966

  System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109

  System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383

  System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181

  System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170

  System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359

  System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28

  System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424

  System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66

  System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496

  System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82

  System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105

  System.Data.SqlClient.SqlConnection.Open() +111

  System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121

  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137

  System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86

  Operation.ShowMainCategory() +99

  _Default.GetMainCategory() +69

  _Default.Page_Load(Object sender, EventArgs e) +21

  System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15

  System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34

  System.Web.UI.Control.OnLoad(EventArgs e) +99

  System.Web.UI.Control.LoadRecursive() +47

  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

--------------------------------------------------------

Thanking you ,

shubahm saurabh

shubahmsaurabh@gmail.com

# August 12, 2007 3:46 PM

arun said:

Could not locate registry entry for OLE DB provider 'Microsoft.SqlServer'.

# August 27, 2007 1:50 AM

iwntstarbucks said:

Seeing how 1and1 doesn't offer remote connection to there SQL2005 is there a string that I can put in my web.config file to get around that?

# September 24, 2007 10:47 AM

Sanjay Kala said:

GO to - Sql server 2005 -> configuration tools ->Sql server 2005 surface area configuration -> click on surface area configuration service and connection -> click on remote connection and set Local and remote connection to - Both TCP/IP and Named Pipe.

This setting is the solution for error 28 connection issue

# September 28, 2007 10:48 AM

BillyZ said:

I want to connect my web application which is on a server on one domain to my sql server 2005 database which is on another server on a different domain.  the SQL Server is set to accept remote connections Both TCP/IP and Named Pipe.

I have tried several connection strings and keep getting error:40-Could not open a connection to SQL Server. here is the string which I believe should work but still gives the error: Data Source=servername.domain.org\sqlServerName;Initial Catalog=databaseName;Persist Security Info=True;User ID=username;Password=userpass

Is there something wrong with the format of this string?

# September 28, 2007 12:57 PM

Justin said:

I'm trying to set up DotNetNuke with SQL Server 2005 and UltiDev CassiniASP.Net Server, but I keep getting That error 26. I have modified my web.config, added UDP port 1434 to the exceptions list on my firewall, and made sure TCP/IP was enabled. Send me an email if you can help me out...  justin057@cox.net

# October 12, 2007 1:05 AM

MING LU said:

# October 12, 2007 1:19 AM

Manav Sinha said:

The following error occurs while creating a linked server from sql server2005 ..

An exception occurred while executing a Transact-SQL statement or batch.(Microsoft.sqlserver.connectioninfo)

Named Pipes provider :Could not open a connection to SQL Server[53].

OLE DB provider "SQLNCLI" for linked server <Linked Server Name> returned message "An error has occurred while establisheing a commention 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".(Microsoft SQL Server,Error:53)

# October 25, 2007 10:15 AM

Manav Sinha said:

The following error occurs while creating a linked server from sql server2005 ..

An exception occurred while executing a Transact-SQL statement or batch.(Microsoft.sqlserver.connectioninfo)

Named Pipes provider :Could not open a connection to SQL Server[53].

OLE DB provider "SQLNCLI" for linked server <Linked Server Name> returned message "An error has occurred while establisheing a commention 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".(Microsoft SQL Server,Error:53)

# October 25, 2007 10:15 AM

BOBO Sinha said:

The following error occurs while creating a linked server from sql server2005 ..

An exception occurred while executing a Transact-SQL statement or batch.(Microsoft.sqlserver.connectioninfo)

Named Pipes provider :Could not open a connection to SQL Server[53].

OLE DB provider "SQLNCLI" for linked server <Linked Server Name> returned message "An error has occurred while establisheing a commention 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".(Microsoft SQL Server,Error:53)

Please send me the solution on bobosinha@yahoo.co.in

# October 25, 2007 10:23 AM

Khushi said:

HI,

I am facing following problem :

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I am unable to find Protocol for instance in configuration manager and it is also enable in client network.  

Plzzzzzzzzzzz help, its urgent !!!!!!!!!

# November 2, 2007 12:10 PM

SQL Protocols said:

Start->Run  "SQLServerManager.msc"

Under  +SQL Server 2005 Network Configuration

            Protocols for INSTANCENAME

                Enable Named Pipes or TCP/IP

then restart the SQL Service

  net stop mssqlserver

  net start mssqlserver

If it's a named instance (not default) start SQLBrowser

net start sqlbrowser

Brad Sarsfield

# November 2, 2007 12:37 PM

khushi said:

Thanx Sir but the problem is that there is no item shown under SQL Server 2005 Network Configuration, no protocol.

Plz help me!!!!!!!!11111

# November 13, 2007 12:27 PM

Andy said:

Hi

I am facing the same error with PeopleSoft application with SQL 2005 database.

The exact error message that I receive is

"[Microsoft][SQL Native Client]TCP Provider: An existing connection was forcibly closed by the remote host.

Failed SQL stmt:UPDATE PS_AX_SETUP_WRKPLC SET COUNTER = COUNTER + 1 "

The strange thing is that I got the same error message for some other processes and the common thing was increamenting the counter as I am doing in the statement above.

Has anyone faced similar problem before?

Thank You In Advance

Andy.

# November 16, 2007 2:59 PM

Khushi said:

HI,

I have installed SQL SERVER 2005 ENT edition and I am facing following problem :

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

I am unable to find Protocol for instance in configuration manager and it is also enable in client network.  

Plzzzzzzzzzzz help, its urgent !!!!!!!!!

# November 17, 2007 7:31 AM

Ananda said:

I have been experiencing the error message listed above:

A successful TCP connection from SqlClient to the server was broken due to a TCP keep-alive heartbeat failure (typically indicating problems with the underlying network infrastructure) (error: 0):

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)

Possibly:

A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

In this Microsoft forum:

http://forums.microsoft.com/msdn/showpost.aspx?postid=134053&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=3

A developer suggests clearing the connection pool associated with the current connection,  and or retrying the connection when the (forcibly closed) connection is discovered.  

In the same forum thread above, notice the similar but different error message caused by SQL Server's defenses against DOS attacks (Error: 10054):

ProviderNum: 7, Error: 10054, ErrorMessage: "TCP Provider: An existing connection was forcibly closed by the remote host

# November 20, 2007 8:12 PM

ken said:

Hi All,

Please help me out in solving the following error

Query Engine Error:'01000:[Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated.'

# January 24, 2008 7:01 AM

teo said:

Hi

I encounterd a rare error,that was 'provider: HTTP Provider, error: 0 - ' with managed SqlClient.

Of course,I did not make a HTTP end point.

This error occured when SQL Server was doing heavy batch process.

SqlClient might have tried to connect the (local)instance with shared memory protocol,but failed.

In past,Koterpillar posted about this HTTP provider error,and I entirely agree with him.

# January 29, 2008 8:41 PM

tshepang said:

could not connect to server windows socket error. no connection could be made because the target machine actively refused it.

# February 6, 2008 2:55 AM

ermias said:

please give some idea about this kind of problems Message="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)"

# February 19, 2008 2:22 PM

Ananda said:

See my post in this forum for the solution and the underlying problem we discovered on our server:

http://forums.microsoft.com/msdn/showpost.aspx?postid=2879238&siteid=1&mode=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=4

# February 20, 2008 4:39 PM

SANDEEP BHARARA said:

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: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061

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) (Microsoft SQL Server, Error: 2)

# March 14, 2008 8:25 AM

SQL Protocols said:

Your error message contains an OS error 2. Please check this blog about what it means. http://blogs.msdn.com/sql_protocols/archive/2007/05/16/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error-xxx.aspx

Basically, this means that NP is not enabled on your SQL Server. Please make sure it's enabled.

Thanks. Xinwei  

# March 14, 2008 12:32 PM

Ah said:

Dear Sir

i have this massege during my connection to SQL Server 2005

"

Login failed for user ''. The user is not associated with a trusted SQL Server connection"

i dont know why?

i ahve windows authenitication Mode for user connected to the Database.

# March 26, 2008 12:34 PM

SQL Protocols said:

Ah: Right now I assume you have Windows Authentication enabled. Try instead changing that to Mixed Mode.

http://support.microsoft.com/kb/555332

If that doesn't work, you can try instead taking a look at your connection string (look at the blog post). Be very careful about your spaces and semi-colons. Play around with it a little and see if that won't get it to work.

HTH - Tres London

# March 31, 2008 2:49 PM

Simon Reilly said:

Anyone offer any advice on some strange behaviour we're seeing?

We're getting different behaviour connecting to SQL2005 under .net v1.1 and .net 2

From the SQL error logs

2008-04-02 15:21:00.07 Logon       Error: 18456, Severity: 14, State: 5.

2008-04-02 15:21:00.07 Logon       Login failed for user 'simsinit'. [CLIENT: 10.128.1.123]

2008-04-02 15:21:23.42 Logon       Error: 18456, Severity: 14, State: 5.

2008-04-02 15:21:23.42 Logon       Login failed for user 'simsinit'. [CLIENT: <local machine>]

When run under a version 1.1 application the IP is used, when run under v2.0 <local machine> is being used and this is causing our application to fail..??

In both instances the connection string is using machinename\instancename , so why is it reporting differently in the logs?

# April 2, 2008 11:24 AM

Sean said:

We have ahd a lot of problems with transport errors in a new SQL Server 2005, ASP.NET 2.0 installation on HP hardware and this was our solution

http://support.microsoft.com/kb/942861

# April 7, 2008 5:37 PM

Tom said:

Hello,

We are getting this error when using SQL Management Studio and .NET:

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)

Thanks for any ideas how to fix it.

Tom

# April 10, 2008 4:54 PM

Steve Elkins said:

I received this version of this error message:

Product: SQL Server

ID:        53

Source:        MSSQLServer

Version: 9.0

Component: SQLEngine

Message: 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) (.Net SqlClient Data Provider)

Explanation

The SQL Server client cannot connect to the server. This error could occur because either the client cannot resolve the name of the server or the name of the server is incorrect.

User Action

Make sure that you have entered the correct server name on the client, and that you can resolve the name of the server from the client. To check TCP/IP name resolution, you can use the ping command in the Windows operating system.

Just for yucks, I replaced the server name with "localhost" and, presto, the connection fired right up! It would appear that the SQL Server Client thinks that its looking for a remote server even when it isn't (I'm working with both client and server on my laptop -- SQL Server 2005 Developer Edition on Vista Business SP1). Can Microsoft fix this?

# April 25, 2008 9:23 PM

SQL Protocols said:

Understanding the error message: “Login failed for user ''. The user is not associated with a trusted

# May 2, 2008 8:33 PM

David2 said:

I have Microsoft SQL Serve, Error: 10061, 1326 and 18452.  I found out the problem actually comes from there is an alias exists under SQL Server Configuration Manager=>SQL Native Client Configuration=>Aliases.  I deleted the alias.  The problem solved.

# May 22, 2008 5:16 AM

norisk said:

I'm stuck with at 10054 "Forcibly closed" error when I try to connect to a Sql Server 2008 instance on a Windows 2008 Server from Sql Server 2008 Management Studio from a Vista machine. The stuff i've seen seems to think it might be network adapter problem, but I tried it from a nearby machine and they could connnect, but when I put their network card on my machine, it had not fixed the problem.

What other than a network adapter issue might cause this problem? I already disabled the DoS entry in the Registy.

Stuck.

# May 31, 2008 3:03 PM

Danali said:

I am trying to setup Database  Mirriroring  on SQL 2005.

Database was setup  on the Mirror Server with No recovery . However when I try to start a mirror ,this is the error I receive

The server network address 'tcp:/mirror server ;5022'cannot be reached or does not exist .please check to make sure the network port for local and remote endpoints are operational .

I have enabled TCPIP /Named pipes on both the parent and mirror server .

Both Server are on the same domain and SQl service account are setup as domain admin login .

Any ideas

# June 5, 2008 7:55 PM

jchecketts said:

Hi, I'm learning SQL on MS SQL Server 2005. I have a C# application on MS Visual Studio which is supposed to retrieve some values from a database and display them. The database and application are both on the same machine. In VS I can see and OPEN the database in the Server Explorer, I can see all tables, values, etc.

I'm running

MS SQL Server 2005 Express

MS C# Visual Studio Express

on a Windows XP SP2 machine

But when I run the app, I get the

Message: 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) (.Net SqlClient Data Provider) error.

TCP/IP and named pipes have both been enabled, to no avail, so I disabled them again. Exceptions for the sqlserver.exe and sqlbrowser.exe were also made in the firewall. Basically I've tried every fix and workaround I could find and  it just will not work. It seems ludicrous that I can see and access the db in VS but my app can't.

 Should I persevere or, given that this seems to be a common and pervasive error with no well-defined solution, just change to a different SQL and stop f"#king about  with something that doesn't work. I need to get things done and have already wasted about three days on this basic, basic issue.

I suspect that the problem may be my connection string but I can't find anywhere how to correctly define the connection string.  

 Help please!

# June 7, 2008 7:18 AM

Jimmy May said:

jchecketts, this may address one of your questions:

http://www.connectionstrings.com

# June 7, 2008 9:30 AM

norisk said:

Note that changes to the Surface Area are not reflected without restarting the service.

Also, you can't just allow the app, you have to open the ports by number (1433, 1434).

Did you pull your connection string from your app or just build one from scratch? If you connect ok in VS, find the connection string and copy it.

Note that SQL has a default instance and named instances when you have more than one version running. Make sure you are hitting on the right one.

I REALLY appreciate your frustration. I recently wrote a long post to Microsoft about some of these issues and they said "We'll keep these in mind".

It is hard to be a one man shop and get anything done.

# June 7, 2008 3:57 PM

bkloth said:

Here is my issue:

I am running VPC on a server.  I have installed SQL Server 2005 on the VPC.  I have changed the port for SQL Server from 1433 to 2633.  On my local machine, I can access the SQL Server database on the VPC by logging in with the following server name:  VPC-SERVER,2633.  However, when I create an alias on my local machine set to the VPC and Port 2633 and try to log in with the alias name, I get the following error:

TITLE: Connect to Database Engine

------------------------------

Cannot connect to VPC-ALIAS.

------------------------------

ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: 53)

Any ideas on why I can connect fine when I specify the port in the server name but not when I try to use an alias?  (I use aliases to connect to other non-VPC servers without issue.)

# June 12, 2008 5:22 PM

bkloth said:

Never mind my above issue.  Somehow it is working now.  Maybe I had an extra space at the end of the alias name or something because I changed it, and it worked, then I changed it back, and it worked again.

# June 12, 2008 5:24 PM

CJ said:

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 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)(Microsoft SQL Server, Error: 53)

How can i solve this?

Thank you.

# June 18, 2008 9:03 PM

ccm said:

All,

  Please HELP ..... Thanks a lot in advance !!!

  I installed SQL Express 2005 on two new laptops with a default instance, using Windows log in accounts, enable TCP/IP at the end of the installations.

  One PC is up and running and connect to the remote server without any problem.

   However, the other one won't connect.  when I tested the connection with "sqlcmd -S<SQL Server> -E", I got the following error ---

Sqlcmd: Error: Microsoft Native Client : Unable to complete login process due to delay in opening server connection.

    Please help, if you can.  Any help will be greatly appreciated.  Thank you all in advance for your time.

Best Regards,

ccm

# June 19, 2008 12:19 PM

norisk said:

The messages says, in effect, that "Under the default settings, this program doesn't work." So, you installed an EMU - a bird that doesn't fly. You have to use the Surface Area tool to allow Named Pipes - then restart the service for the changes to take place. WHY every release of Sql Server is shipped with a non-functional installation configuration is an incredible decision from Redmond and a source of a lot of bad taste regarding this product. You also need to check your ports if you are doing remote access.

The connection string - build it with a wizard and copy it. Don't try to figure it out on your own.

http://woundedego.com

# June 19, 2008 2:29 PM

AlexWCY said:

Hi all, I have below error happend in my production server that running on Windows 2003 server and SQL Server 2005. Sometime happen and sometime not, may I know what is the caused? Thanks !

Source = .Net SqlClient Data Provider

Error = A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - Not enough storage is available to complete this operation.) |    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

  at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

  at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

  at System.Data.SqlClient.SqlConnection.Open()

# July 1, 2008 4:32 AM

slav said:

hey guys. please help me with this problem.

i got this conection string:

String connectionString = @"Data Source=hostname\SQLEXPRESS;Database=pubs;Integrated Security=TRUE";

and after compiling i get this error: Cannot open database "pubs" requested by the login. The login failed.

and if i use the string without specifying database(just like that: String connectionString = @"Data Source=hostname\SQLEXPRESS;Integrated Security=TRUE";

) everything is fine.

what should i do to connect to sql server on local machine at last? 1

# July 12, 2008 4:01 AM

slav said:

one more question. i've tried to find northwind or pubs database samples but i didn't manage to do so. All i have is folder with Northwind as a SQL Server Compact Edition. are they compatible?

so as i understand, i didn't instal MSSQL 2005 properly. where can i find those samples(northwind, pubs) and where i should place them?

Thank you for your attention.

# July 12, 2008 4:53 AM

James Turner said:

Just hopping that this will help in the solution of this problem!

Server Error in '/' Application.

--------------------------------------------------------------------------------

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

# July 21, 2008 3:47 AM

Colin Graham said:

i dont know if its any use but i had the problem relating to the following error message.

SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed.

anyway it transpired that i had inadvertently started using an old connect string that had "Integrated Security=True" as part of the string.

Once i removed this everything worked fine. i hope this helps.

<a href='http://www.thewebbureau.com'>web design belfast ireland</a>

# July 31, 2008 7:32 AM

DeveloperSmith said:

Well I have been getting this elusive error message for weeks now:

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 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)

I tried everything suggested here and more, like setting my local connection setting to remote and local connection with TCP/IP and named pipes, adding the sqlserver.exe and sqlbrowser.exe to my firewall exceptions, change my data source from a period to (local), localhost, .\SQLEXPRESS, and on and on, none of this helped.  I'm working on a Vista Home Premium laptop, with VS 2005 Pro and SQL Server 2005 Express.

My solution: I removed all the above changes, put everything back to their default settings and then I changed my connection string in my code to look like the code below, hopefully this will work for you too:

public const String ConnectionString =         @"Server=<myComputerName>\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=<myDatabaseName>";

Note: This code is for a C# Windows app, the @ sign is important, it allows the backslash to not be treated as an escape character, and Server name needs to be named with your computer name followed by \SQLEXPRESS

# August 6, 2008 2:39 AM

AlexBB said:

I have run into this problem which I consider a bug pertaining to both Sql Server and VS2008. When I try to set up a connection in Server Explorer of VS2008 to Sql Express or Sql Dev Edition I get a typical error that the remote connection cannot not be established. In fact it is. I double and triple checked everything numerous times. Also in fact I can connect to Sql Server via my C# programs using standard connection strings.

It is still a minor issue. The major irritant is that after such an attempt I lose the ability to sign in to Sql Server management Studio.

When it first happened last May I thought that I made a major error and it forced me to uninstall Sql Express and replace it with Sql Dev Edition. Last week I tried to set up a connection thru a dbml file with Linq Query Designer. It is supposed set up the connections in Server Explorer in VS2008 on the left. Exactly the same thing happen. Now I cannot get into Sql Management Studio.

Not: It never happened with VS2005.

Thanks. - Alex

# August 10, 2008 10:49 AM

SAHIL said:

TITLE: Connect to Server

------------------------------

Cannot connect to SAHIL.

------------------------------

ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

------------------------------

BUTTONS:

OK

------------------------------

# September 9, 2008 3:02 AM

BiswaRanjan said:

While i am scheduling my database back up,I have an error "Error: 18456, Severity: 14, State: 8." and

"Error code 3041 for sql server 2005".

Back up is not perform.

wht is the sollution.

# September 13, 2008 4:43 AM

Mahesh K said:

Hi,

     I have installed SQL Server 2005 on a Vista Business. I am able to connect to SQL Server instance on Vista machine from Management Studio on other machine (Running on Xp).

     But I am not able to connect to Analysis Services default instance on Vista Business machine from Management Studio on other machine (Running on Xp).

     I did all settings with Vista firewall exceptions, SQL Surface area configuration, Security, everything.

     Please tell me do I need to modify something else on 'Vista Business'.

     Thank you.

# September 19, 2008 4:45 AM

SVK said:

checked lots of things

on using command at command promopt SQLCMD -S.\SQLEXPRESS getting below msg

HResult 0xFFFFFFFF, Level 16, State 1

SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi

shing a connection to the server. When connecting to SQL Server 2005, this failu

re may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

when trying to connet thr' sql server management studio after registering the server  which

doesnt show green dot . it shows white round means its not statrted

and getting error msg

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) (Microsoft SQL

Server, Error: 2)

checked the tcp/ip, shared memory and named pipes all are enabled

on using

osql -E -surekha\svk

getting below error

[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL

Server [2].

[SQL Native Client]Login timeout expired

[SQL Native Client]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.

if i install sql 2000 it works fine

let me knw how culd i solve the connectivity problem

# September 26, 2008 7:17 AM

SQL Protocols said:

Hi SVK,

 It looks like your SQL Server instance is not started.  Start up services.msc, look for the SQL Server (SQLEXPRESS) service, and start it.  If you find that it was already started, verify that you are typing the name of the instance correctly (e.g., is it actually SQLEXPRESS, or is it named something else?).

Hope this helps!

# September 30, 2008 8:30 PM

Alex said:

Login failed for user 'web'. The user is not associated with a trusted SQL Server connection.

How to associate this user with with a trusted SQL Server connection (I need script)

# October 7, 2008 6:26 AM

greg aiken said:

stand alone windows xp computer + sp2

1. sql server configuration manager

     sql server 2005 network configuration

        protocols for SQLEXPRESS

           tcp/ip protocals (enabled)

              ip address (tab)

                 ipall

                    tcp dynamic ports = 2101

2. sqlexpress service stopped, then restarted successfully (running as 'local system' acct)

3. in registry, confirmed that port 2101 was being used.

4. in sql server log, confirmed that port 2101 was being used

5. no firewalls running on my computer

6. sqlbrowser service stopped, then restarted successfully (running as 'local system' acct)

7.  running sqlcmd, where i explicitly specify tcp protocol and port number - does work

C:\>sqlcmd -S tcp:.\sqlexpress,2101 -E

1> exit

8.  PROBLEM IS HERE. however running sqlcmd, where i specify tcp protocol and let sqlcmd figure out port to use (via interaction with sqlbrowser) does NOT work!

C:\>sqlcmd -S tcp:.\sqlexpress -E

HResult 0xFFFFFFFF, Level 16, State 1

SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi

shing a connection to the server. When connecting to SQL Server 2005, this failu

re may be caused by the fact that under the default settings SQL Server does not

allow remote connections..

Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

UNQUALIFIED ASSESSMENT:

it appears to me that either something is wrong with the client connectivity library (im not sure if 'sqlcmd' actually uses 'sqloledb' or 'sqlncli').

or something is wrong with the interaction between the client library and sqlbrowser.

i do not know how to troubleshoot further...  

any help would be GREATLY APPRECIATED

# October 9, 2008 2:26 PM

Raf said:

Turkish error mesage:"Sunucuyla bağlantı kurulurken hata oluştu. Bu hata, SQL Server 2005'e bağlanılırken, SQL Server'ın uzak bağlantılara izin vermediği varsayılan ayarlar altında oluşan durum nedeniyle oluşabilir. (provider: Adlandırılmış Kanal Sağlayıcısı, error: 40 - SQL Server için bağlantı açılamadı) (.Net SqlClient Data Provider)"

i couldnt resolve my problem...

# October 17, 2008 10:40 AM

Jason said:

I get the following error when executing SQL Server 2005 SSIS packages that transfer data from one server to another using OLE DB Source and Destination components.

[OLE DB Source - Agreement [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Protocol error in TDS stream". An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Protocol error in TDS stream". An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Protocol error in TDS stream". An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Communication link failure". An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "TCP Provider: An existing connection was forcibly closed by the remote host. ".

Thanks

# October 20, 2008 5:09 PM

Raju said:

I got the following error while making connection to sql server 2005 :

"An error has occured while establishing a connection to the server. when connecting to sqlserver 2005, this failure may be caused by the fact that under default settings SQL server does not allow remote connections.

(Provider: Named Pipes Provider, error : 40 - could not open a connection to SQL server )(Microsoft SQL SERVER, ERROR : 2)"

Can anyone help me out to fix it ?

# October 24, 2008 2:05 AM

Bill Ross said:

Not everyone who successfully connects to their SQL server is a SQL genius. By walking through the wizard in Management Studio one can connect pretty easily and then just copy the connection string that is generated. Just know that VS will reformat it and you need to get rid of the added quotation marks.

# October 24, 2008 9:16 AM

Larry Van Brunt said:

From SQL Server Management Studio I get the following error connecting to a SQL server in a different domain:

Login failed for user ''. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)

On the server Application event log I get:

SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed.

And on the server System Event Log I get:

The kerberos subsystem encountered a PAC verification failure.  This indicates that the PAC from the client "insertnamehere" in realm "DomainHere" had a PAC which failed to verify or was modified.  Contact your system administrator.

I have removed the server from the domain and re-added it. Reinstalled SP2 and still get the error. I am able to connect to other sql servers in the domain without incident - just this one.

# October 31, 2008 3:37 PM

Rakesh Krishna said:

The Request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details

# November 19, 2008 5:11 AM

Rakesh Krishna said:

Hi Guys,

   This is th error

         The Request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details.

I got when i am starting the SQL SERVER(MSSQLSERVER) &

SQL Server Agent(MSSQLSERVER) from the SQL Server

Configuration Manager .

Waiting for your Kindly Reply

Thanks,

# November 19, 2008 5:32 AM

ChileuMM said:

I am getting exactly the same error but when I try to start the SSIS from my EM, any ideas are highly appreciated.

# November 20, 2008 3:59 PM

Joy Corales said:

IS there a possible solution in this error rather than re executing the batch??

Sqlcmd: Error: Microsoft SQL Native Client : Unable to complete login process due to delay in opening server connection.

# November 24, 2008 9:21 PM

vaibhav said:

I HAVE WINDOWS VISTA HOME PREMIUM(SP1)

i am facing problem during login to sql server.

pl do the needful.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

------------------------------

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476

------------------------------

Error Number: 53

Severity: 20

State: 0

# January 31, 2009 12:31 AM

Shabaz said:

I am not able to access sql browser it is not showing that in sql server. Does any one suggest me how to connect to sql server.

Thanks.

# February 3, 2009 1:32 PM

Jatin said:

Please provide me any help for this error.

A transport level error has occured when receiving results from the server.

(provider: TCP Provider,error: 0 - The semaphore timeout period has expired.

Thanks.

# February 6, 2009 7:38 AM

Xinwei Hong said:

# February 10, 2009 1:24 PM

Drigg said:

Your story was featured in Drigg! Here is the link to vote it up and promote it: http://wordgeist.com/Programming/SQL_Server_2005_connectivity_error_messages

# February 26, 2009 7:42 PM

Ketan Jajal said:

Hi,

I have Installed SQL Server 2005, when i try to telnet, it fails, OS :- Winxp

# March 6, 2009 5:48 PM

Bjørn Sigurd Johansen said:

Dreadful error "A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)" SOLVED, at least in my case:

CLR client code was calling a CLR Stored Procedure that resultet in above error message.  The problem turned out to be date-values initiate to "zero-date", i.e. "12:00:00 AM" (with year 0).  Normally, this gives decent error message stating something like "SQL Server does not accept dates with year<1753".  I have a Stored Procedure with 94 parameters, AND THIS SEEMS TO CORRUPT PROPER ERROR HANDLING.  (I have some time ago read that SQL Server debugging from Visual Studio not is possible if the total parameter-size exeeds some 256 or 512 bytes, which is not very much....).

MICROSOFT:  Please look into this, real-life Stored Procedures easily add/updates objects with houndreds or more parameters.

Best regards,

Bjørn Sigurd Johansen

Norway

# March 17, 2009 6:51 AM

horhay1973 said:

I am currently installing windows update, and a perfectly working PC suddely now starts giving the error message below :-

Microsoft SQL Server Login:

Connection failed:

SQLState: '01000'

SQL Server Error: 53

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect()).

Connection failed:

SQLState: '08001'

SQL Server Error: 17

[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.

......................................................

how can i solve this error?

# April 3, 2009 7:55 AM

Jose Luis Cocha said:

DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.  An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Login timeout expired".  An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "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.".  An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "TCP Provider: No such host is known.

# May 25, 2009 3:52 PM

student said:

it will be very nice of u ,if u can fix this problem......

# July 3, 2009 8:34 PM

student said:

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

# July 3, 2009 8:35 PM

Octavian Cucuta said:

Christopher, THANK YOU!!!

Christopher Cheng said:

For those who gave up, try one more thing:

Start "SQL Server Configuration Manager",

In "SQL Server 2005 Network Configuration" > "Protocols for SQLEXPRESS", Click on the tab "IP Addresses", Change all TCP Port to 1433.

Yes, I mean all, even "IPAll", then it will work!

# July 4, 2009 11:00 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker