Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SQL Express connecting form remote error 26

Posted on 2016-10-10
7
Medium Priority
?
97 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:Sajid Shaik M
7 Comments
 
LVL 18

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 17

Author Comment

by:Sajid Shaik M
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 53

Expert Comment

by:Vitor Montalvão
ID: 41836673
Check if you have SQL Browser running. If not, start it.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 17

Author Comment

by:Sajid Shaik M
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 53

Accepted Solution

by:
Vitor Montalvão earned 2000 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 17

Author Comment

by:Sajid Shaik M
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

810 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