Home » SQL Server

How to Resolve this ? provider: TCP Provider, error: 0 - The specified network name is no longer ava

Hi guys ,

I am facing a weird issue with SQL Server. Our application team is getting these kind of error since this morning while login through the Application and sometime while fetching the data from the application.

Can Some one please help me on this matter. Is this something related to the SQL Server. We are using SQL Server 2008 R2 on Window Server 2008 R2.

I have been googling this whole day. I could find the fix to this problem.


Please share your thought if someone experienced the same problem.




Error Message:

1/4/2011 10:07:30 AM - security_UserManager_login - System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)

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

   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

   at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)

   at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)

   at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()

   at System.Data.SqlClient.TdsParserStateObject.ReadBuffer()

   at System.Data.SqlClient.TdsParserStateObject.ReadByte()

   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

   at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)

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

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

   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.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)

   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)

   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)

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

   at XXXX.Data.Client.DataWrapper.ExecuteProcedure(String storedProcedure, DbParameter[] parameters)


5 Answers Found


Answer 1

By any chance did you just change the default value for "user connections" using sp_configure ? Is there any real intermittent issue in your network setup? Any more logs from SQL trace and windows event viewer ?

Thanks, Leks


Answer 2

Thanks for replying Lekss


I did not make changes to User connection setting:






I did not find any errors in the Window event and  SQL Error log.  Network people confirmed they don't have any issues. I thought it might be something with total connection to the SQL Server . I found there were 250 connections at that time. But connections used to exceed to 300 before and there used to be no issues.

We just rebooted the Db Server and everything seems to work fine now with total of 100 connections.

Is it possible that we exceeded no of connections and SQL Server drops the connections....I believe 32767 is the total no of connection  we can right ?

Also I want to update something else.. when we rebooted the server all the app and SSMS on XP machines were connecting to the db server but the App and SSMS on Window 7 machines could not connect.

but after some time window 7 machine could also connect ....


Any Ideas ....?



Answer 3

This would probably get better results on the .NET forum.

However, has this every worked?  Is this a new installation?  What has changed? 

This seems to indicate you are trying to run a stored proc using a connection string.  I would suspect either the user does not have access to the stored proc or some other security issue is blocking the user.


Answer 4

Has the password for the Login changed?

The error message states that the error occurred during the login process.

This to me suggest a possible authentication issue for the Login you are connecting with. I suggest validating the credentials used by Login that your application/client is using, by testing them by connecting to SQL Server using SQL Server Management Studio.

John Sansom | SQL Server DBA Blog | SQL Server Consultants - Santech Solutions

Answer 5

Thanks for your inputs Tom and John. 


I am not a .Net guy. I am newbie in SQL , working as junior dba. Everything is good on the SQL Server side. This is QA region. Login credentials,permissions and everything was working fine from last 5 months but suddenly client started getting this error as above:

 an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)


As I said before, sometimes when client uses some fetch functionality in the App it does not returns complete results. They get the same error in between the process.


I am just worried if it's some thing wrong from the SQL Server side. I hope it's nothing concerned with the number of simultaneous connections to the SQL Server.

Can you please shed some light on this.....?






i have a sever that when i run it it runs all right but when i update the client i get this error Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:8731/Design_Time_Addresses/Hatzalah/HatzalahService/mex'


my app.config

<prelang="x-xml"><?xmlversion="1.0"encoding="utf-8"?><configuration><system.serviceModel><behaviors><serviceBehaviors><behaviorname="Hatzalah.HatzalahServiceBehavior"><serviceMetadatahttpGetEnabled="false"/><serviceDebugincludeExceptionDetailInFaults="false"/></behavior></serviceBehaviors></behaviors><services><servicebehaviorConfiguration="Hatzalah.HatzalahServiceBehavior"name="Hatzalah.HatzalahService"><!--<endpoint address="" binding="netTcpBinding" contract="Hatzalah.IHatzalahService">
            <dns value="localhost" />
        </endpoint>--><endpointaddress="" binding="netTcpBinding"contract="Hatzalah.IMokedSevices"><identity><dnsvalue="localhost"/></identity></endpoint><endpointaddress="" binding="netTcpBinding"contract="Hatzalah.IAmbulanceSevices"><identity><dnsvalue="localhost"/></identity></endpoint><endpointaddress="mex"binding="mexTcpBinding"contract="IMetadataExchange"/><host><baseAddresses><addbaseAddress="net.tcp://localhost:8731/Design_Time_Addresses/Hatzalah/HatzalahService/"/></baseAddresses></host></service></services></system.serviceModel></configuration>


this is my connection address net.tcp://localhost:8731/Design_Time_Addresses/Hatzalah/HatzalahService/mex 

it worked until i made changes (i added another endpoint but do not know if it's the problem)




1. Two node cluster - node1, node2
2. Windows 2008
3. SQL Server 2005 SP3 (with Critical Update package 10)
4. Each node has an active instance.
    node1: virtualnameA\instanceX
    node2: virtualnameB\instanceY
5. Windows XP client

From client, using SSMS I can connect to both instances i.e. virtualnameA\instanceX and virtualnameB\instanceY.

From node1, using SSMS I can connect to virtualnameA\instanceX but not virtualnameB\instanceY.
From node2, using SSMS I can connect to virtualnameB\instanceY but not virtualnameA\instanceX.
I get this error 26.

This error message popped up when when I tried to connect to virtualnameA\instanceX from node2
TITLE: Connect to Server
Cannot connect to virtualnameA\instanceX.

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

I have tried this but this is not the issue:

Appreciate your feedback and clues.



Well my problem is this error message Message="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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

but :

-can't connect to SqlServer Express 2005 on my network server from my application while ITS RUNNING. What I mean is that when I use Server Explorer Window on VS2008 every thing is fine (I can even insert and modify data from server explorer), in fact, when I use Datatables and I choose to preview data through TableAdapters (Design Time) I get data, and also can run the queries from there directly to the data base, but when I'm debbugin the application I get this error.

-when I run Sql Server Management Studio, its also fine, even though I can't see the Sql instance on the server (or any of my partners machine) when I try to browse them. But if I type the server path (servername\instancename) everything is OK.

-I know the problem is not the connection string 'cause mya partners nd I use the same one to connect to the server, and no one has this problem.

-also tried to shut down my firewall and the server's also, and nothing.

-ok here are the specs for both, server and client pc:


*Running Windows Server 2008 64 bits

*Sql Server Express 2005 SP2 x86 (WOW)


*Running Windows Vista Ultimate SP1 64 bits

*Sql Server Express 2005 SP2 x86 (WOW)

*Sql server 2008 Enterprise 64 bits

*VS 2008 Team Suite.

  Everyone Else:

*Windows Vista ultimate 32 bits

*Sql Server Express 2005 SP2

So can you help me?? please, I'm working localy only, so is a pain doing this

If you connect to a server and open a query in SQL Managment studio (2005) and looses connection and then regain the connection, when you try to run the query it gives me a "TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host."
This happens against both 2005 and 2000 servers.
If I re-run the query it works.
However, this happens in our VB.NET app as well for clients with Wireless connections.
So, something has changed in Framework 2.0 regarding this, does anyone know how to tell the client to not throw this error and just try connecting the server instead which will work?


I wanted to post my problem and solution since I've gotten some good information on this board.   When deploying my Visual Studio 2005 C# .NET 2.0 web application from our QA server to Production, I encountered some problems, which is not unusual.   What was unusual is that two of my four Crystal Reports .NET reports that use the Report Viewer control would not work; they errored out with:

 Exception information:
    Exception type: COMException
    Exception message: Logon failed.
Details: Error Code: 0x
Source: ADODB.Connection
Description: Provider cannot be found. It may not be properly installed.
Error in File C:\WINDOWS\TEMP\Pie {DA99EAD9-419D-4570-A0D6-AD19CC13D399}.rpt:
Unable to connect: incorrect log on parameters

After much research and trial and error, it turns out that I inadvertently used SQL Native Client or SQLNCLI instead of SQLOLEDB in the reports that did NOT work.  Switching these out without recreating the reports involved opening up the report for edit in Visual Studio, right-clicking on the report and choose Database, then Set Database Location, expand the properties node and right click on the provider, and change it to SQLOLEDB.   Follow the rest of the wizard steps to verify the change, test it (of course), save it, then deploy it.   Everything should work fine.

Bon courage!



On a SQL 2008 Server I have an SQL view defined that uses a Linkied Server to retrieve data from a remote SQL 2005 database. The Linked Server is defined using the SQLNCLI10 provider.

Running the view works fine from SQL 2008 Management studio, but when run from a PHP application (using the v1.1 or v2.0 CT2 driver) the following error message is returned and the SQL Server 2008 log indicates that the SQL server has crashed.:

][SQL Server Native Client 10.0]TCP Provider: An existing connection was forcibly closed by the remote host


I’m writing a custom Linq provider and when I am processing the expression and I have passed in something like this:


var basket = basketContext.Single(p => p.Name == “MyBasketName”);


I am able to resolve it as a “ConstantExpression”.


However, if I pass in something like this:

var basket = basketContext.Single(p => p.Name == ServiceProxy.BasketName);


where I am passing in a property instead of a constant, I am not able to parse the expression to it’s underlying value.

It exceptions, telling me it is a “System.Linq.Expressions.PropertyExpression”, however there doesn’t seem to be any such thing.

I have Binged around and not seen any documentation or details or examples of how to resolve.

If I pass in a field, instead of a property, it tells me it is a “System.Linq.Expressions.FieldExpression” which also doesn’t seem to exist.


Am I missing an assembly with extensions for these expression types?

Can anyone provide some guidance on how to resolve these property and field expression types to their underlying values?

I would like to ask for support regarding this problem:
SSP provisioning will be retried periodically. If you correct the error that caused this failure, provisioning will subsequently succeed. To stop provisioning from being retired, delete the SSP.

I'm creating a New SSP & everytime I create, I received that message.

I tried to reset the IIS already, restart the machine, but still I received that error after I create a new SSP.

Wait for soonest advise!


I have a SQL Server 2008 on a WS 2003 cluster. Client connection is dropping intermitently. I have enabled trace flag 7827 and I founf the following result:





































RecordTime>10/13/2010 3:43:7.906</RecordTime>






























































































Can you please help me undertand that:







Thank you!


 Iam doing an server-client application. This is done with tcpListener and tcpClient. If the Pc has its own IP (not local 192.168.xxx.xxx) I have no problem with connecting on server - all works fine. But if I try to connect to the server form my laptop which is connected to a local network (not mine), the laptop has a local ip (192.168.xxx.xxx) I cannot connect to the server. What can I do that the laptop will go out of the local network and will then find my server`s ip?


Iam buidling a server-client application (card game) and I would like to know whats the best way of passing data to populate dataGridView on a client`s side?

Lets say I have data on the server in generic List<T>. How can I pass this list over to the client? I am using tcp network services (tcpListener/tcpClient).

Maybe generic list isnt the best idea, so I would also like to know what is.

thx in advance,



We are using WCF 3.5 and SQL Server 2000 database instance.
We have MS DTC running and configured.

I am using the TransactionScope functionality in my service call. My service call calls a SP in a SQL Server 2000 database. 

I have created a new SQL connection that does not enlist the TransactionScopes transaction object, but instead creates its own transaction object. I then call the SQL execute command to run the SP. I get a SQL Exception back, capture the error that was raised by the RAISERROR function in the SP that I called. This passes back the error message to the consumer of the service and everything looks fine. But then I do another call on this same method that uses the same code and I get the "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.)"

I ran a SQL Profiler trace on these calls and noticed that after most of the SP are execute the SP sp_reset_connection is ran, but after I execute my SP that calls the Rollback, the sp_reset_connection SP never gets called until I try and call the SP a second time. Then it seems the sp_reset_connection SP get called and resets my connection.

This seems to be a connection issue now and I am leaning towards it being a MS DTC issue because if I run the same SP without a transaction at all I don't have any issues.

Any suggestions or help would be much appreciated.


Here is the code I am using for my connection.

using (TransactionScope txScope = newTransactionScope(TransactionScopeOption.Required))


using (SqlConnection conn = newSqlConnection(Data Source=ServerName\SQL2000;Initial Catalog=DatabaseName;Integrated Security=True;Enlist=false))


SqlCommand cmd = newSqlCommand("spname", conn);


cmd.Transaction = conn.BeginTransaction();



cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.Add(newSqlParameter("@Parameter1", P1));

cmd.Parameters.Add(newSqlParameter("@Parameter2", P2));

cmd.Parameters.Add(newSqlParameter("@Parameter3", P3));

cmd.Parameters.Add(newSqlParameter("@Parameter4", P4));

cmd.Parameters.Add(newSqlParameter("@Parameter5", P5));

cmd.Parameters.Add(newSqlParameter("@Parameter6", P6));

cmd.Parameters.Add(newSqlParameter("@Parameter7", P7));

cmd.Parameters.Add(newSqlParameter("@Parameter8", P8));

cmd.Parameters.Add(newSqlParameter("@Parameter9", P9));

cmd.Parameters.Add(newSqlParameter("@Parameter10", P10));

cmd.Parameters.Add(newSqlParameter("@Parameter11", P11));

SqlDataAdapter adapter = newSqlDataAdapter();

adapter.SelectCommand = cmd;





catch (SqlException sqlEx)





//AMS ERROR, SQL Exception



newServiceResponseMessage(MessageBase.MessageTypeEnum.Error, sqlEx.Message)






Hi all,

I use Asp.Net 2.0 and SQL server 2000 and I get the above error in my site.I went through the other posts and reply.It is said to clear the connection pools.So i need a clear view what that will do.When should i actually clear it.Will Clearing the pools introduce any other problem or is there any othere solution for this. Please help me in solving this.



after lots  of goes and back, I have the same problem but it is related to my Visual studio too. Because I can access to the same database  for new projects but when I use an existing project with a new default page I get the same error.
I am using visual studio 2005 connecting to MSSQL 2008 in server that has an instance of SQLServer express 2005 too
the code for boht new and existing project is bellow

I appricate any help


protectedvoid Page_Load(object sender, EventArgs e)



SqlConnection cn = newSqlConnection();


string s = "Data Source=FRONTEND\\RNMSSQL2008;Initial Catalog=LSA;Persist Security Info=True;User ID=sa;Password=mypassword;Connect Timeout=30";

cn.ConnectionString = @s;



SqlCommand mycmd = newSqlCommand();

mycmd.CommandText =

"Select * from ASG_lot";

mycmd.Connection = cn;


SqlDataReader myreader;

myreader = mycmd.ExecuteReader();


while (myreader.Read())








I have a Windows Service that trying to access my SQL, it worked but suddenly it stopped working =\

Here is the code:

private void SQLUpdate()
                SqlConnection con = new SqlConnection(SQL.ConnectionString());
                SqlCommand cmd = new SqlCommand("AddInfected", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Name", System.Environment.MachineName);
                int rows = cmd.ExecuteNonQuery();
            catch (Exception e)

And here is the connection string:

static public string ConnectionString()
            //Online database connection string
            return @"Data Source=niceuserdb.db.*****.hostedresource.com; Initial Catalog=niceuserdb; User ID=niceuserdb; Password=****;";

(the *** is just to make it unknown)

the SQL server is hosted on GoDaddy and work perfectly on direct connect form GoDaddy, also GoDaddy provides the Connection String that worked before...

I dont know whats wrong.

Here is the full error:

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)

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)

Please Help, Thx.


On windows 2008 using sql 2k8 standard edition. I have a couple of apps that run on the server. One works perfectly and attaches to sql with no problem. The second app that uses THE EXACT SAME CONNECTION STRING and gives me the following error,

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

How can one app work and the other not? What can I check for?



I know Frontpage went away years ago replaced by Expression Web, but now my main hosting company claims no more new websites with Frontpage Extensions, even if on a Windows Server. I like to use Visual Web Developer 2008 but wonder now what do I do?

Go back to FTP and keep a local copy and upload/dowload? I hope not...that's why I started to use Frontpage 97 years ago. The guy at Network Solutions suggested I use Dreamweaver and I laughed and don't want to change or use anything else except Microsoft products.

What are my options to edit live and connect to websites with no Frontpage extensions? Is Network Solutions nuts? I see a lot of new Windows 2008 servers out there advertising with Frontpage extensions on them for new hosting.



I have a network share folder called "Reports" that I have given access to a group of users.  They are able to browse the folder and open PDF files by double clicking them or entering the full path in Windows Explorer address bar.  This has been working for 3 months now.  Suddenly last Friday things changed. 

When they go to the share by entering the FULL PATH in WINDOWS EXPLORER address bar like this:


They can see all of the reports (pdf and xls files) and double click any one of them and it opens the file.

However, if they enter the full file path in the address bar like this:


Instead of opening the test.pdf file (which they were able to open by double clicking it in step 1) they get a pop up window error:

cannot find 'file://shr01/data01/0111/Reports/test.pdf'.  Make sure path or Internet address is correct.

This popup error just started appearing last Friday.  This is happening to only a handfull of users in the group not all of them.

Any help would be greatly appreciated.





Here is my situation...

I am having a very random error on my network.  To diagnose, I have a computer setup that I want to do a long (24-48 hour) capture.  This PC is an i5 with 4GB RAM and a clean 750GB HD, so there should not be a resource issue.

I have setup very specific capture filters, so it only captures about 50-100 packets/minute.  However, over about 30 min, my memory use on netmon.exe jumps from 80MB to over 1.3GB and then the application hangs.  Once that happens, my whole capture is gone.

What suggestions do you have?



I have an ssis package that brings data from mainframe and saves it to text files on windows share drive. the package brings large amount of data into each file and there are about 200 files. now after processing around 100 files or so my package started failing with the following error, can some body tell if its problem with package , do I have to change any settings or is it something to do with networking....

The script threw an exception: The specified network name is no longer available



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure