Making sure Windows doesn't start your service before SQL Server
This is more of a "note to self" of the syntax, but, if you have a service that depends on another (such as a local SQL Server instance for local logging) then you can tell Windows about that dependency. The command line is:
sc config MyServiceName depend= MSSQLSERVER
- Needs to be run from an administrative command prompt
- Must have the space after the equals symbol
- Uses the service names that are displayed under "Service name:" at the top of the "General" tab if you view the properties of the service in the Services control panel
The name of the SQL Server service can, and will, vary. If you had an instance called BADGER then the name of the service will likely be MSSQL$BADGER, so don't assume the name of the SQL Server service. You can also use this to setup dependencies between any other services you want, it's not limited to SQL Server as it's a piece of general Windows functionality rather than being part of SQL Server.
My skillset has matured somewhat since then, which you'll probably see from the posts here. You can read a bit more about me on the about page of the site, or check out some of the other posts on my areas of interest.