-2

I'm trying to connect my server to MS SQL Server Studio but keep on getting an error. On this post I saw that I can use PowerShell to get more information on what the SQL Server is doing. It seems mine is not running and I'm guessing that is why I get the error. How do I turn on my SQL server?

PS C:\Users\rohrl> get-service *sql*

Status   Name               DisplayName
------   ----               -----------
Stopped  MSSQL$SQLEXPRESS   SQL Server (SQLEXPRESS)
Stopped  SQLAgent$SQLEXP... SQL Server Agent (SQLEXPRESS)
Stopped  SQLBrowser         SQL Server Browser
Stopped  SQLTELEMETRY$SQ... SQL Server CEIP service (SQLEXPRESS)
Running  SQLWriter          SQL Server VSS Writer
2
  • Did you check the documentation yet? – vonPryz Jan 26 at 7:25
  • I can’t even find out where the software is installed currently. I have 4 different folders named SQL express. – rohrl77 Jan 26 at 7:27
3

you have to start the services by control panel/services or by command:

net start MSSQL$SQLEXPRESS
net start "SQL Server Browser"

please, take a look at this:

https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/start-stop-pause-resume-restart-sql-server-services?view=sql-server-ver15

3
  • @MNuschi Note the Agent service is only necessary if you're using the Agent in your server such as for scheduled jobs. – J.D. Jan 26 at 12:02
  • 1
    Express version does not support the agent - so no reason to attempt starting it. – SMor Jan 26 at 12:31
  • Thank you @mbuschi – rohrl77 Jan 29 at 14:01
2

You're 90% of the way there in PowerShell - just mod your command slightly:

get-service *sql* | start-service

SQL Express can't use the agent so it doesn't matter if it starts or not.


PowerShell Explanation:

PowerShell allows you to pipe the output of one command into another, so the output of get-service (all your services) will be passed to the start-service command, which will attempt to start each of these services.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.