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

Hi All,

getting below error while executing a query. It is failing while running ExecuteReader() in C# code. Please Help.

System.ComponentModel.Win32Exception (0x80004005): The specified network name is no longer available, MESSAGE: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.), DETAILS:System.Data.SqlClient.SqlException (0x80131904): 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.) ---> System.ComponentModel.Win32Exception (0x80004005): The specified network name is no longer available
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
   at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
   at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
   at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
   at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader()
ClientConnectionId:058f01f1-0473-4b07-9b58-9832972bf153

Regards,

Nishant Jain

August 28th, 2015 12:31pm

Do you have any related messages in the SQL Server error log?
Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 12:34pm

There are no SQL error log generated for this exception.
August 28th, 2015 1:20pm

Hello,

Please examine the connection string.



Hope this helps.



Regards,

Alberto Morillo
SQLCoffee.com

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 1:25pm

Does it always happen when you run that particular query? Or is it completely random?

I'm not a networking guy, but that particular message The specified network name is no longer available seems to me like strictly a network issue. Could there be some network sniffer that cuts the connection if the query appears to include something which it thinks is inappropriate?

August 28th, 2015 8:40pm

Hello Alberto,

Connection string is fine; because other queries are executing fine.

this is happening with only one query and I have verified that query by executing in SQL Server Query Analyzer and that works fine.

No issue with parameters, datatype.

Regards

Nishant

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2015 1:59am

No it is not random. This is consistently happening with one query; other executes fine.

I have verified that query by executing in SQL Server Query Analyzer and that works fine. No issue with parameters, datatype.

Regards

Nishant

August 31st, 2015 2:00am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics