'cannot connect to pc-name\SQLEXPRESS
While trying to connect to SQL Server 2005 Standard Edition through SQL Server Management Studio 2005 I get the following error:

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:

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

What is the problem?
This SQL server runs on a single machine, not on a cluster or on a client server.
Solution 1:[1]

Go to services (services.msc) and restart the services in the image and then try to connect.
Solution 2:[2]
If you have Microsoft Windows 10:
- 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
- Click on Administrative Tools
- Then double click on Services
- Scroll down and look for: SQL Server (SQLEXPRESS), after that right click
- And then in the pop out windows click on Start
Now you should be able to connect to your pc-name\SQLEXPRESS
Solution 3:[3]
Use (LocalDB)\MSSQLLocalDB as the server name
Solution 4:[4]
Follow these steps then you solve your problem 100%.
- When you get this error then close everything(Microsoft SQL Server Managment):
Then open command prompt by pressing (
window+r) keys and typeservices.mscand click OK or press Enter key.And search **SQL Server (SQLEXPRESS) as I show in the image.
Now see left upper side and click start.
If you open Microsoft SQL Server Management then you not get any type error.
Enjoy!!!
Solution 5:[5]
When you get this error.
Follow these steps then you solve your problem
- 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 6:[6]
I'm Running Windows 10 and this worked for me:
- Open services by searching in the toolbar for Services.
- Right click SQL Server (SQLEXPESS)
- Go To Properties - Log On
- Check Local System Account & Allow service to interact with desktop.
- Apply and restart service.
- I was then able to connect
Solution 7:[7]
Initialize the SQL Server Browser Service.
Solution 8:[8]
try using IP instead of pc name. If the ip working, then it might be the name pipe is not enable. If it;s still not working then the login using windows might be disabled.
Solution 9:[9]
I had this problem. So I put like this: PC-NAME\SQLSERVER Since the SQLSERVER the instance name that was set at installation.
Authentication: Windows Authentication
Connects !!!
Solution 10:[10]
go to services and start the ones related to SQL
Solution 11:[11]
My issue occurs when I add a PC to a domain. Restarting the service, making sure it's running, that it has the correct credentials to run, etc, as in other answers doesn't work. I don't know exactly what the problem is, but I can't even log in with the local user anymore to give the domain user access. Here's the steps that work for me:
In SSMS
- View > Registered Servers
- Database Engine > Local Server Groups > right-click
pcname\sqlexpress - Delete > Yes
- Right-click Local Server Groups > Tasks > Register Local Servers
- It confirms that it re-registered.
pcname\sqlexpressreappears.
I'm then able to log in with the local windows auth'd user again, my databases are all there and everything. I then go about my business adding the domain user to Security > Logins.
Solution 12:[12]
In my case, I was copying and pasting the server name from appsettings.json as;
DESKTOP-IVQP9DJ\\SQLEXPRESS.
So the problem was that there were two slashes in the server name which was causing the issue for me.
If you are using .net core and copying/pasting server name like me make sure to use only one slash as:
DESKTOP-IVQP9DJ\SQLEXPRESS
Solution 13:[13]
If you already did that Then just restart the service :
- start menu
- Microsoft SQL Server 20xx
- Sql Server 20xx Configuration Manager
- SQL Server Service (at left tree)
- SQL Server (SQLEXPRESS) (at right region)
- right click -> restart
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow


