r/SQLServer • • Jun 23 '26

Question Cannot login to local SQL Server instance

On my old work laptop I had SQL Server Developer edition installed to use for training purposes and for practicing things. I recently was given a new laptop and had a tech install it. We had to make my local account an admin login and I had him make sure the SQL Server Service was would run automatically. After that I was able to get into SQL Server just fine and was able to add a practice DB using a script I had.

Well last week I went to login to it and it gave me the following error:

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: 40 - Could not open a connection to SQL Server) (Framework Microsoft SqlClient Data Provider).

I had another tech look into it and we could not figure it out. On the Connect window for the Connect to Database engine, I have my laptop name as the server name, authentication to windows authentication, DB name to default, encrypt to optional. Previously I was able to get in fine but like I said now im not.

0 Upvotes

31 comments sorted by

View all comments

Show parent comment

1

u/arebitrue87 Jun 23 '26

You’re probably missing files, sql server needs all database files in the directory you specified for it to start services properly.

Do this. Open config manager, go to properties of the service, find the parameters tab and find where the error log is, open the error log. Identify the cause of the service not starting. My money is you moved a system database or deleted it. If you deleted I’m afraid an instance repair is the only way to fix it