Click here to Skip to main content
15,906,816 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:

i am facing problem while connecting to SQL SERVER 2008 r2 and it is displaying the following content

TITLE: Connect to Server

Cannot connect to xxxxxxx\SQLEXPRESS.


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)


What I have tried:

i had opened services and start SQL server automatically and clicked apply and ok... still getting the same message..
Updated 7-Nov-16 5:29am
F-ES Sitecore 4-Nov-16 8:09am    
We can't access your system so don't know why you can't connect. Do what the message says and ensure the instance name is correct (the SQLEXPRESS bit), that it allows remote connections, and also check for firewall issues on the port being used. If you google the error message you'll probably find a checklist of things to check.
Suvendu Shekhar Giri 4-Nov-16 8:16am    
Make sure you have typed in correct server instance name.
You can also click the dropdown and click browse for more to see the list of available instances and select the appropriate one.
[no name] 4-Nov-16 10:00am    
Add/Enable port 443 (public too) on Windows Firewall and see if resolves the problem or at least if the error message changes

Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.

If you can't establish a connection that way, then you need to look carefully at where your DB is, and what you need to provide in order to access it.
Share this answer
> Go to SQL Server Configuration Manager
> Make sure that the SQL Server Browser was configured to start automatically and was started.
> Go to SQL Server Configuration Manager
> SQL Server Services
> Right Side window show all the servers which may stop.
> Right click on SQL Server and start.
> Connect to server
You can also take the help of this link: Reasons of SQL Server Error 26 and know how to fix Error 26[^]
Share this answer
you need to start this two services in SQL SERVER CONFIGURATION MANAGER.
2. SQL Server Browser

And one more thing you need to enable the Protocols for MSSQLSERVER

Shared Memory   Enabled
Named Pipes     Enabled
TCP/IP          Enabled
VIA             Disabled
Share this answer
thanks for all for your valuable suggestions :-) :-)
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900