My SQL Server's instance name is SQLEXPRESS and SQL Server Service Name looks like MSSQL$SQLEXPRESS. Is there any relation between instance name and service name? I'm trying to check SQL Server Service Status by name and I wonder can SQL Server Service name be different on another computers?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Yes, the service name is always
You can enumerate the installed instances on a server via the registry, using Powershell for example:
Mark showed you a way to get this information directly from the registry, but another way to do this would be through WMI, consumed by PowerShell:
The above command will give you the state of the SQL Server engine service(s) on a particular machine.