SQL Server – Cannot connect to SQL Server – A network related or instance specific error occurred

Hello Everybody,

Today I am going to write about an error which I encountered when I was working on the project.

So the scenario is, I started SQL server management studio to do some changes in database. And on the Connect to Object Explorer window, I clicked Connect but I got the following error. See figure .1 Similarly you can get this error from your window form application.

ConnectToServer_Error
Figure .1 SQL Server – Cannot connect to server

So I started searching on Google about this error.

Causes of this error:

  1. Can be because of Network issue.
  2. Can be because of SQL server configuration issue.
  3. Can be because of Firewall issue.
  4. Can be because of Authentication and log on issue.
  5. Can be because of Stopped SQL Server(SQLEXPRESS) service.

In my case it was because of the last option that is SQLEXPRESS service was stopped and was not running.

Resolution:

  1. In Windows cortana search, look for Services and open.

    fig1 - Services app
    Figure 2. Windows – Services Desktop App
  2. In this list of services search for SQL Server (SQLEXPRESS).

    FIG 2 - SQL Server (SQLEXPRESS) SERVICE
    Figure 3. Windows  Services – SQL Server (SQLEXPRESS) service stopped
  3. Select the service and right click on it. Click start.

    FIG 3 SQL Server (SQLEXPRESS) STARTING THE SERVICE
    Figure 4. Windows Services  – Starting SQL Server (SQLEXPRESS) services

Now start SQL server management studio and connect, you won’t get the error.

References:

http://support.sysonline.com/support/solutions/articles/4000016491-errmsg-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql

https://stackoverflow.com/questions/18060667/why-am-i-getting-cannot-connect-to-server-a-network-related-or-instance-speci

Thanks for reading 🙂

Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. If you have any suggestion / feedback / doubt, you are most welcome.

Stay tuned on Knowledge-Junction, will come up with more such articles

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.