A network-related or instance-specific error occurred while establishing a connection to SQL Server

No.of Views746
Bookmarked0 times
Downloads 
Votes0
By  dotnetfish   On  22 Dec 2010 22:12:20
Tag : Sql Servers , General
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)
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

Today i face another issue with sql server 2005 connect with ASP.NET web application.The error message as like below,

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

But I found the way how to resolve it.

Step by Steps to resolve

1. Enable TCP/IP

Go to Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Configuration Manager 

Image Loading

Make sure TCP/IP is Enabled

Image Loading

2. Make sure MS SQL allow remote connection with TCP/IP protocol.

Go to Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Surface Area Configuration

Image Loading

Click on Surface Area Configuration for Services and Connections

Image Loading

Make sure Local and remote connections and using TCP/IP only is selected.

Image Loading

3. Open port for Port: 1433, sqlbrowser.exe and sqlservr.exe in windows firewall.

Launch the Windows Firewall configuration tool from the control panel.
Click the Exceptions Tab
Click on Add Port, key in information as below

 

Image Loading

Repeat above but this time click the "Add Programs." button and select "sqlservr.exe" from the
location where you install SQL Server Express (normally in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn)
Report the same steps but select "sqlbrowser.exe" (normally in: C:\Program Files\Microsoft SQL Server\90\Shared) 

Image Loading

Try again and the problem solved. Hope this help.

 
Sign Up to vote for this article
 
About Author
 
dotnetfish
Occupation-
Company-
Member Type-Senior
Location-United States
Joined date-05 Sep 2010
Home Page-www.xininvoice.com
Blog Page-dotnetfish.blogspot.com
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top