What is the service name for SQL Server when installed by Visual Studio

Crashd Code 21 Reputation points
2022-08-10T17:42:36.003+00:00

I've installed the SQL Server modules with Visual Studio 2019. There are no services listed in "services" corresponding to SQL, MSSQL, Localdb, SQLExpress, or anything containing the letters "SQL". I've tried net stop with mssqlserver, sqlexpress, localdb, mssqllocaldb, and ProjectsV13, and each throws an error because the service name doesn't exist. "Select @@Servicename" returns "LOCALDB#6A3BFD14", which also doesn't appear in the Services list and results in a "service name doesn't exist" error when I try to name it using net stop. The SQL Server instance names are (localdb)\ProjectsV13 and (localdb)\MSSQLlocalDB.

I want to start and stop the sql service manually but I can't find the service name. Yes, SQL server is running, I can connect to it with VS and SSMS. To reiterate, SQL was selected as a module when installing Visual Studio. It wasn't installed separately using full SQL or express installations.

Thank you.

SQL Server Other
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2022-08-10T21:34:04.433+00:00

    Localdb does not run as a service, but runs in your user space. You control your localdb instances with the sqllocaldb utility. Which I would expect to be in your path if you have opened a VS command prompt. sqllocaldb -? gives you information on how to run it.


1 additional answer

Sort by: Most helpful
  1. LuckyA 1 Reputation point
    2022-08-11T08:43:01.263+00:00

    Hi @Crashd Code ,

    Agree with Erland, localdb does not run as a service. Please reading this thread to get detail steps to start Local DB.


    If the answer is helpful, please click "Accept Answer" .

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.