Wednesday, May 1, 2013

Error: 26 - Error Locating Server/ Instance Specified in SQLServer

Recently I have experienced the following error message when connecting to SQLServer

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: Named Pipes Provider, error: 26 – Error Locating Server/ Instance Specified) (Microsoft SQL Server)

Cause 1: If SQLServer is not allowing remote connections.

Possible solution1:

1. Microsoft Management Studio, Right Click Database Server and go to properties
2. On Security Page, under Server Authentication select “SQL Server and Windows Authentication mode” and click OK
3. Restart SQLServer Service

In case of SQLServer 2005, follow below steps to enable remote connections

1. Click on Startup, go to Program files and Select Microsoft SQL Server 2005--> Configuration tools--> SQL Server Surface Area Configuration

2. Click on “Surface Area Configuration for Services and Connections -->  SQL Server Browser--> Select “Automatic” for Startup type and Apply

Cause 2: TCP Port 1433 or UDP Port 1434 ports are not in Firewall exceptions

Possible solution2: Add exception to allow port TCP Port 1433 and UDP Port 1434 or Turn off Firewall rules


Regards
Satishbabu Gunukula
http://www.sqlserver-expert.com

Free Visual Studio video Tutorials


You will learn how to work with Visual Studio 2005, add-ins to perform testing, Team System, Deployment and other tasks.

1. Intro to Unit Testing with Team System

2. Intro to Testing Web Applications with Team System

3. Intro to Load Testing Web Applications with Team System

4. Intro to Manual Testing with Team System

5. Intro to Managing and Running Tests with Team System

6. Measuring the Business Value of AJAX

7. Code Coverage of Automated Tests

8. Custom Extraction Rules and Coded Web Tests

9. Effects of Caching

10. Load Test Agent

11. Effects of ViewState

12. Integrate Defect Tracking with Testing

13. Create My Own Bug Work Item

14. Write Code More Quickly with Unit Tests

15. Practice Test-Driven Development

16. Load Test a Web Application

17. Tune Web Application Performance with Profiling

18. Set Up Distributed Load Testing for High Volume Tests

19. Enforce Coding Standards with Code Analysis

20. Use Generic Tests

21. Publish and Analyze Test Results

22. Discover Application Changes Prior to Deployment

23. Implement Continuous Integration with Team Foundation

24. Automate Testing using Team Build

25. Deploy a Web Application during a Team Build

26. Run Unit Tests against a Deployed Database

27. Enable Code Coverage and Profiling in Production Applications

28. Web Deployment Projects

29. Web Application Projects & Web Deployment Projects

I hope these videos are helpful to you .

Regards
Satishbabu Gunukula
http://www.sqlserver-expert.com

Starting up database message in ERROR.log file


We have noticed that one SQLServer Database is starting very frequently and also it is in "Recovery Pending" mode.

Below error messages from SCOM
Database WEBAPP in SQL Server instance INST1 on computer CLUST.sqlserver-expert.com is offline/recovery pending/suspect/emergency

Below messages from  ERROR.LOG
2013-05-01 12:06:53.29 spid122     Starting up database ‘WEBAPP’.
2013-05-01 12:08:04.20 spid123     Starting up database ‘WEBAPP’.
2013-05-01 12:09:14.25 spid184     Starting up database ‘WEBAPP’.

Solution:- You will see this issue then AUTO CLOSE option is set to TRUE in Database properties.

If you set AUTO_CLOSE to TRUE then the database will be closed as soon as there are no connections to it and database will re-open every time a connection is established to it. 

There is no much information from log. But you will see this error when backup is running, because backup job trying to create a  new connection to the database.

Set AUTO CLOSE option to FALSE to resolve this issue.

Management Studio --> Select the Database "WEBAPP" -->  Right Click  Properties--> Options --> "Auto Close" value to "False"

Regards
Satishbabu Gunukula