Solved

SQL Express connecting form remote error 26

Posted on 2016-10-10
7
41 Views
Last Modified: 2016-10-14
Dear All

SQL Express installed on our server  ServerA and instance name is SqlExpress which is working fine on the local server, recently we activated windows server after trial expired... then onward we are facing an issue from remote sites.

that from remote SQL Express we are unable to connect database Error showing  SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified,

the thing is while connecting Sql instance name with port it's working fine but without port it's not connecting

EX:   ServerA\SqlExpress,1433   (it's connecting but our application giving error)

when we try to connect with ServerA\SqlExpress  the connection is failed with the following 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (.Net SqlClient Data Provider)

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

------------------------------
Error Number: -1
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(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
   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.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.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
   at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

could you please guide me how to connect without the port ...

thanks
0
Comment
Question by:Shaik M. Sajid
7 Comments
 
LVL 17

Expert Comment

by:Gaurav Singh
ID: 41836615
are you able to telnet the Port from the remote server?  Refer below:
https://technet.microsoft.com/en-us/library/ms165718(v=sql.105).aspx
0
 
LVL 16

Author Comment

by:Shaik M. Sajid
ID: 41836632
Hi, Gaurav,

yeah i am able to telnet as i said

i am able to connect  from remote SQLExpress    .. instance name with port no.

ServerA\SqlExpress,1433     (is working fine  but i dont want to use the port here)

thanks
0
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 41836673
Check if you have SQL Browser running. If not, start it.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 16

Author Comment

by:Shaik M. Sajid
ID: 41836757
Dear, Vitor Montalvão thanks i tried this already

but no use...

the question is Prior to activate windwos2008 R2 (on trial Version) it worked fine but after activation the same server with genuine key... the issue rised...

will it make any difference ?
0
 
LVL 46

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 41836761
Oh, you activated the Windows Server and not the SQL Server.
Did you try to repair the SQL Server installation? Maybe it needs to know that Windows has been activated so a repair can help.
0
 
LVL 16

Author Comment

by:Shaik M. Sajid
ID: 41836766
hmm i'll try this and let you know ...

thanks
0
 
LVL 4

Expert Comment

by:Daniel Jones
ID: 41837838
Go to SQL Server Configuration Manager
> SQL Server Services
> Window show all the servers which may stop (right side)
> Right click on SQL Server(SQLEXPRESS) and start.
> Try to connect server

Make sure that the "SQL Server Browser" was configured to start automatically and was started.

For more solutions, visit: http://www.sqlserverlogexplorer.com/fix-error-code-26/
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now