The error message:
"A network-related or instance-specific error occured while establishing a network 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)"
could occur be as a result of any of the following three conditions:
1. Network is down
Try Pinging the server from the client by going to the command prompt (Click Start, type CMD, press Enter, then type PING <server ip address> eg. Ping 126.96.36.199)
If you get a response then the network is up.
2. Firewall blocking access.
A 3rd party firewall (usually part of an antivirus/internet security suite) may be blocking access to the server. Ensure that the firewall on the server gives full inbound and outbound access to the following programs
- C:\Program Files\Microsoft SQL Server\MSSQL.10\MSSQL\Binn\sqlservr.exe
- C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe
If no 3rd party firewall is installed then you need to grant this access to the inbuilt Windows Firewall as follows:
In your Control Panel, open the Windows Firewall applet.
- Go to the Exceptions tab.
- Click Add Program
- Browse to and select "C:\Program Files\Microsoft SQL Server\MSSQL.10\MSSQL\Binn\sqlservr.exe"
- Click OK.
- Click Add Program
- Browse to and select "C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe"
- Click OK and then click OK again.
3. SQL Server Services not running.
On the computer running SQL Server
- Start Task Manager
- Select Service tab and click Services.. button
Ensure that the following services are running and set to startup automatically
- SQL Server (SQLEXPRESS)
- SQL Server Browser
If they are not running double click on each of the services above and follow the steps below
- Set Startup Type to Automatic
- Click Start
- Click Apply
- Click Ok