cannot connect to pc-name\SQLEXPRESS

114,599

Solution 1

If you have Microsoft Windows 10:

  1. Type Control Panel on Cortana search bar (which is says by default 'Type here to search'). Or click on Windows icon and type Control Panel
  2. Click on Administrative Tools
  3. Then double click on Services
  4. Scroll down and look for: SQL Server (SQLEXPRESS), after that right click
  5. And then in the pop out windows click on Start

Now you should be able to connect to your pc-name\SQLEXPRESS

Solution 2

Use (LocalDB)\MSSQLLocalDB as the server name

Solution 3

Follow these steps then you solve your problem 100%.

  1. When you get this error then close everything(Microsoft SQL Server Managment):

error

  1. Then open command prompt by pressing (window + r) keys and type services.msc and click OK or press Enter key.

  2. And search **SQL Server (SQLEXPRESS) as I show in the image.

enter image description here

  1. Now see left upper side and click start.

  2. If you open Microsoft SQL Server Management then you not get any type error.

Enjoy!!!

Solution 4

When you get this error.

Follow these steps then you solve your problem

  1. Open command prompt by pressing (window + r) keys or Click on windows Button and Type Run then type services.msc and click OK or press Enter key.

2.Find SQL Server (SQLEXPRESS).

3.Now see left upper side and click start.

4.If Service show error then right click on SQL Express and then click on Properties.

5.Then click on Logon Tab.

6.Enter Username and Password of Windows Authentication

7.Then Start your Service

8.Problem will be solve and run your query

Solution 5

I'm Running Windows 10 and this worked for me:

  1. Open services by searching in the toolbar for Services.
  2. Right click SQL Server (SQLEXPESS)
  3. Go To Properties - Log On
  4. Check Local System Account & Allow service to interact with desktop.
  5. Apply and restart service.
  6. I was then able to connect
Share:
114,599
Waleed Ehsan
Author by

Waleed Ehsan

Updated on May 31, 2021

Comments

  • Waleed Ehsan
    Waleed Ehsan almost 3 years

    While trying to connect to SQL Server 2005 Standard Edition through SQL Server Management Studio 2005 I get the following error:

    screen shoot of error is given bellow

    I put all my effort to solve this problem but there is no solution. On stack overflow in the following post I found this screen shot: solution of screen shot

    When I see my connect to server dialog box I find the difference like

    my connect to server dialog box

    What is the problem?

    This SQL server runs on a single machine, not on a cluster or on a client server.