Hi all,
I am new to SQL 2005. I have one issue and it is as follows:
I write a simple query and run it; it works fine.
Now I break the network connection and run the query; in this case it runs fine.
But when I reconnect the network and run the query, then I get an error as follows:
"A transport-level error has occurred when sending the request to the server. (provider: Named Pipes Provider, error: 0 - An unexpected network error occurred.) "
Every thing is local here. So how the network issue comes here?
For some reason the connection was made through Named Pipes instead of Shared Memory (the default for local connections), which suggests that SqlClient did not recognize the connection was local, and most likely tunneled Named Pipes over TCP, hence, disocnnecting the network has impact.
How do you specify the server name - perhaps by its fully qualified domain name (FQDN), or IP address?
If you specify it by the hostname or "." or "(local)" SqlClient should recognize the local connection, and you should not see the error.
|||Hi ,
sorry to reply late.
I tried the above mentioned case. In case of "." or "(local)" it did not connect to the SQL server. When I try it by the host name then same original problem persist.
Thanks
|||Well sorry once again!!!
I made some mistake in the above reply.
I tried as mentioned in the solution and here are the results:
In case of "." it works fine
In case of host name the problem still persists.
for "(local)" I have not yet tested.
Thanks
|||Regarding the host name problem - do you specify the server name exactly the same way as returned by the Windows hostname command-line command?
|||Yes, I specify the server name exactly as returned by the the windows hostname command-line command. But the problem still persists.
|||Great post ~ I had the same problem.
When trying to connect to a local SQL Server I was using 'localhost', which resulted in "A transport-level error has occurred...".
To resolve, I replaced 'localhost' with '(local)', as suggested.
Regards.
|||I same the same problem but I am connecting to remote server using IP, any idea?
No comments:
Post a Comment