Created On:  07 April 2011


The StarTeam Service is set to ‘Automatic’ startup type, but it still fails to start after the machine is rebooted, whether intentionally restarted, or from system failure. Setting the ‘Recovery’ actions for failure to restart the service does not appear to have any effect on restarting the StarTeam Service.


The StarTeam Service does try to restart when set to 'Automatic'. However, the problem arises when the service is restarting too quickly and usually before the StarTeam database instance has been enabled. Because the StarTeam Service cannot connect or locate the database, it will abort the start sequence for the service.

One solution to this problem is to ensure that the database has successfully and completely started up before attempting to start the StarTeam Service. To do this, a service 'Dependency' must be set so the StarTeam Service "depends" on the SQL Server (or other database) Service to be running before trying to start.

The dependency needs to be configured using the 'sc.exe' (Service Control) command from a DOS prompt. The following example assumes setting a dependency on SQL Server (this may need modified slightly if using an alternative database system)

2.  Locate the StarTeam Service(s) to create the dependency on.
Right-Click | Select Properties to get the 'Service Name', this may be slightly different than the 'Name' listed in the main dialog. For StarTeam Services the name usually has spaces removed, for example, "StarTeamServer-StarDraw"
3.  Locate the main SQL Server service, the default is usually called "SQL Server (MSSQLSERVER)" and again make a note of the 'Service Name', in this example, it is "MSSQLSERVER"
4.  Open a command prompt and type the command; 

sc config ‹SERVICENAME1› depend= ‹SERVICENAME2›

There is a space after the 'depend=' switch, this space is required. This will set SERVICENAME1 to start only after SERVICENAME2 has successfully started.

For example;
sc config StarTeamServer-StarDraw depend= MSSQLSERVER
If the dependency is successful you will receive the following message;

[SC] ChangeServiceConfig SUCCESS

Once this has been configured, when the machine is restarted, the StarTeam Service will wait until the SQL Server Service has completed it's startup sequence before trying to start. This should now ensure that the StarTeam Service will be running when the machine completes its' boot-up sequence.