Sqlcmd: Error: Microsoft SQL Native Client: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. This will occure when trying to connect to sql server 2005
Wednesday, September 8, 2010
A network-related or instance-specific error occurred while establishing a connection to SQL Server. sql server 2005, asp.net, c#.net, sqlconnection
Sometimes when trying to connect to sql server 2005 database the following error message will come
CAME GARD GT4
BFT MOOVI30
CAME G4000
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)
To resolve this error follow the steps
1. Start -> All Programs > SQL Server 2005 > Configuration Tools > SQL Server Surface Area Configuration. Click on Surface Area Configuration for Services and Connections. Select the instance that is having a problem > Database Engine > Remote Connections. Enable local and remote connections. Restart instance.
2. If you are not using a domain account as a service account (for example if you are using NETWORK SERVICE), you may want to switch this first before proceeding
3. If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings
4. You may need to create an exception on the firewall for the SQL Server instance and port you are using. Start > Run > Firewall.cpl. Click on exceptions tab. Add the sqlservr.exe (typically located in C:\Program Files (x86)\Microsoft SQL Server\MSSQL.x\MSSQL\Binn), and port (default is 1433). Check your connection string as well
5. If you are using a named SQL Server instance, make sure you are using that instance name in your connection strings
6. Check SQLBrowser; check that it is running. You may also need to create an exception in your firewall for SQLBrowser.
TACS LLC Dubai
Time Attendance Dubai
Access Control System
Gate Barrier
HRMS Solutions
EID Reader Software
EID Reader
Building Maintanance
UHF Reader
Subscribe to:
Post Comments (Atom)
8 comments:
Hi
Thanks for reply.
My problem solved for sql express
but I use Win7 and in firewall I cann't find "exceptions tab".
Why exactly have you decided to scrape someone elses post and pass it off as your own work? I'm intreagued.
He should have used a reference URL, but come on he is just sharing. So we can find usefull stuff, what's wrong whith that?
thanks to share this
"Top Blogger" the actual author is an excellent blogger - read her blogs. copy some of the text and search - You will find her site - amazing sql skills.
thank you very much, this certainly saved me from a big hazard!
hi ,
great post..
i will write a post on this error with screen shots
http://csharpektroncmssql.blogspot.in/2012/04/network-related-or-instance-specific.html
thank you so much..
Post a Comment