Created On:  25 April 2011

Problem:

The StarTeam server requires that the database is running in order to start up successfully. When restarting the StarTeam server machine it is therefore important that the database service is running prior to the StarTeam service attempting to start.  This is normally achieved using Windows service dependencies, however this is not always possible to implement.

Resolution:

The services can be started in sequence using a batch script, in order to ensure proper startup order.

1. Open services.msc and locate the StarTeam Server service
2. Right click the service
3. Select Properties
4. Change the startup type to manual
5. Click OK

Repeat the above for the database service.

Create a batch script with the following contents, editing the service names as appropriate. To verify the name of each service, check its entry in services.msc

@echo off
REM - Description: Star Team Services
echo Starting Star Team Services...
echo ======================================================

net start "Microsoft SQL Server"

:dbrunningloop
ping 123.45.67.89 -n 1 -w 2000 > nul
SC query "SQL Server (SSE2005_ST)" | FIND "STATE" | FIND "RUNNING"
IF errorlevel 1 GOTO :dbrunningloop
:serverstart
net start "StarTeam Server - StarDraw"

echo ======================================================
echo Star Team Services Complete.

Additional loops can be added for MPX components if required.

Run the above to ensure service names have been edited correctly.

Once script has been verified as correct, place in the Start Menu Startup folder to ensure startup upon boot.
Incident #2511379