kbk
kbk

Reputation: 9

how to fix mssql:Error 2 in vs code mssql extension?

When I have tried to connect to localhost and it was displayed the message about

"mssql:Error 2: 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)".

How can I fix it?

I have tried to follow the solution technique given by "Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?" but i can't find the location of vscode mssql extension configuration tool and SQL Server Configuration Manager?

Upvotes: 1

Views: 3260

Answers (1)

You may be changed your computer name. if you changed your computer name then back to set initial name of computer. Then restart your Sql Server(MSSQLSERVER)service.

Upvotes: 1

Related Questions