Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stopping other Services from starting until SQL Server is running

General Information

Stopping other Services from starting until SQL Server is running

by  mrdenny  Posted    (Edited  )
There are some times that you just need that 3rd party service to not start until after the SQL Server is up and running.

I would recommend setting the service dependency for the 3rd party service so that it depends on the SQL Server. This way it will not start until the SQL Service has started.

[color red]This is a registry tweak and probably isn't supported by anyone, but "should" work.[/color]

Open regedt32 (You have to use this, regedit won't work).
Navigate to HKLM\system\CurrentControlSet\Services\{Name of the 3rd Party Service}
[color blue]
The name of the 3rd party service will be the Service Name not the Display Name. You can find the Service Name by looking at the properties of the Service in the Services Control Panel.
[/color]
If there is a DependOnService key edit it and add "MSSQLSERVER", if not create it as a REG_MULTI_SZ and put "MSSQLSERVER" in the box. [color blue]With out the quotes in both cases.[/color]

Click OK, and close RegEdt32.

You can verify that this worked by checking in the services control panel.
The next time that you reboot the server your 3rd party service will not start until after the MSSQLSERVER service has started.
You can also verify this by stopping the MSSQLSERVER service and it will tell you that it will also stop the SQLSERVERAGENT (if running) and your 3rd party service.

You can use this method to make any service depend on any other service. Be ware of loops. If ServiceA depends on ServiceB and ServiceB depends on ServiceC and ServiceC depends on ServiceA none of the services will be able to start.


Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top