locked
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified RRS feed

  • Question

  • Hi

    I am receiving an intermittent error as described in the thread title. I have checked several other threads and the commons solutions seem to be...

    check the SQL browser service is running

    check the spelling of the instance name

    check that the correct UDP port is open on the firewall

    All of the above are ok in my case but where my case differs is that the error is intermittent - restarting the server solves the problem but sooner or later, it reocurrs. This specificaly relates to an asp.net application - even when I start getting the error, the web app runs fine over the network but running it in debug or testing / creating connection strings gives error 26. I am all out of ideas with this and it's really not convenient to shut down the server in the middle of a working day. I intended to include the full error text at the end of this question but in the time it has taken me to type this, it has started working again (what the ____!!??!). I am running SQL Server 2008 Express with Visual Studio 2010. Any help would be greatly appreciated.

    Regards

    Steve

     Update: full error text below...

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

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

    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): 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)]
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009598
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234
       System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity) +341
       System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject) +129
       System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout) +270
       System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +195
       System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +232
       System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
       System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +33
       System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +524
       System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
       System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +479
       System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
       System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126
       System.Data.SqlClient.SqlConnection.Open() +125
       System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +123
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +319
       System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
       System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1618
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
       System.Web.UI.WebControls.GridView.DataBind() +4
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +66
       System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +75
       System.Web.UI.Control.EnsureChildControls() +102
       System.Web.UI.Control.PreRenderRecursiveInternal() +42
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

     


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    Tuesday, October 26, 2010 11:26 AM

Answers

  • Any more ideas on this? The problem occurred again this morning so I tried pinging the server and had no issues doing so. As stated above, the production installation of the application that runs over our network (as our local intranet) works fine - I am only getting this error when debugging from Visual Studio 2010. Restarting the server seems to fix the issue but only for a couple of days or so. Also, I have no doubt that if I keep trying throughout the day, it will suddenly be working again temporarily without me making any configuration changes. I am completely out of ideas here, any help would be greatly appreciated.

    Reagrds

    Steve


    Since this issue only happens while debuging asp.net applications from Visual Studio, I would like suggest opening a case with Microsoft CSS (http://support.microsoft.com).

    Thanks,
    Chunsong


    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Proposed as answer by Papy Normand Wednesday, November 3, 2010 8:50 AM
    • Marked as answer by Steve_Flynn Wednesday, November 3, 2010 5:08 PM
    Wednesday, November 3, 2010 5:15 AM

All replies

  • The SQL Protocols team keeps a pretty active blog that is often helpful.  For example:

    http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

    Perhaps you have already read this, since it mentions the three common answers that you have seen.  However, because of the intermittent problem that you face, I would suspect problem 3.

    3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).

    I suspect that there are some intermittent networking problems that are causing you difficulty.  This may mean getting the network people (if there are some) to monitor and trace the network components.  Then they should have information to correlate with you next outage.

    FWIW,
    RLF

    Tuesday, October 26, 2010 1:22 PM
  • Thanks for the reply Russell. Since I last restarted my server, this problem hasn't resurfaced although I expect it will happen sooner or later. I'll try your suggestions when this next occurs.

    Regards

    Steve

    Thursday, October 28, 2010 9:21 AM
  • Any more ideas on this? The problem occurred again this morning so I tried pinging the server and had no issues doing so. As stated above, the production installation of the application that runs over our network (as our local intranet) works fine - I am only getting this error when debugging from Visual Studio 2010. Restarting the server seems to fix the issue but only for a couple of days or so. Also, I have no doubt that if I keep trying throughout the day, it will suddenly be working again temporarily without me making any configuration changes. I am completely out of ideas here, any help would be greatly appreciated.

    Reagrds

    Steve

    Tuesday, November 2, 2010 10:40 AM
  • Steve, I have not the personal experience.  But "Mister James" had a similar experience that he blogged about here:

    http://theycallmemrjames.blogspot.com/2010/01/sql-network-interfaces-error-26-error.html

    His problem, found under "Finally a Solution" was using the "default constructor" in a couple of places, which actually (in his case) pointed to a different server.

    Hope it helps,
    RLF

    Tuesday, November 2, 2010 12:49 PM
  • Any more ideas on this? The problem occurred again this morning so I tried pinging the server and had no issues doing so. As stated above, the production installation of the application that runs over our network (as our local intranet) works fine - I am only getting this error when debugging from Visual Studio 2010. Restarting the server seems to fix the issue but only for a couple of days or so. Also, I have no doubt that if I keep trying throughout the day, it will suddenly be working again temporarily without me making any configuration changes. I am completely out of ideas here, any help would be greatly appreciated.

    Reagrds

    Steve


    Since this issue only happens while debuging asp.net applications from Visual Studio, I would like suggest opening a case with Microsoft CSS (http://support.microsoft.com).

    Thanks,
    Chunsong


    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    • Proposed as answer by Papy Normand Wednesday, November 3, 2010 8:50 AM
    • Marked as answer by Steve_Flynn Wednesday, November 3, 2010 5:08 PM
    Wednesday, November 3, 2010 5:15 AM
  • Thanks for the reply Chunsong. I tried this but when I entered my product key, the site said 'all non chargeable support calls have already been used'. Seems strange seeing as I have only contacted them once since purchase. However, I probably should have posted this in the VS forums.

    Thanks

    Steve

    Wednesday, November 3, 2010 5:08 PM