The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,180 other subscribers

StarTeam 2005 on Windows 2003 Server using MSDE: service dependencies

Posted by jpluimers on 2010/08/24

Recently, I had to restore StarTeam 2005 on a Windows 2003 Server.

An out-of-the-box install using MSDE 2000 does not want to run as a service.

This post shows you how I solved that problem. The system event log is of no help, but you get two helpful messages in the application event log:

Event Type:	Warning
Event Source:	MSSQL$STARTEAM
Event Category:	(8)
Event ID:	19011
Date:		7/12/2010
Time:		8:22:13 AM
User:		N/A
Computer:	W2K3-VM
Description:
The description for Event ID ( 19011 ) in Source ( MSSQL$STARTEAM ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: (SpnRegister) : Error 1355.

followed by

Event Type:	Error
Event Source:	StarTeamServer
Event Category:	None
Event ID:	1
Date:		7/12/2010
Time:		8:22:14 AM
User:		N/A
Computer:	W2K3-VM
Description:
StarTeam Server error: Failed to start StarTeam Server Service MyStarTeam2005R2_W2K3..

I started by searching for “SQL Server” 2000 “Event ID” 19011, but those results were not really what I was after.
Then I realized that maybe the SQL Server started fine, so I digged up my SQL Server batch files including the ServerProperty one, and indeed it started fine:

C:\bin>sql-show-edition.bat
[...]
SQLCMD: "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE"
found ".\STARTEAM"
state of service MSSQL$STARTEAM with SQL Server instance .\STARTEAM is RUNNING
SQL Instance=.\STARTEAM

MachineName          Instance        ProductVersion ProductLevel Edition              CLR             LicenseType     NumLicenses
-------------------- --------------- -------------- ------------ -------------------- --------------- --------------- -----------
W2K3-VM              STARTEAM        8.00.679       SP2          Desktop Engine       NULL            DISABLED        NULL

So: the problem is not that MSDE is not running, but that the StarTeam service cannot connect to SQL Server when it is started.

The underlying cause is that the StarTeam service does not include a dependency on the service running the MSDE instance it needs.

Somehow, StarTeam does not include that info when creating the service.

It is pretty easy to query the dependencies for a service using the sc command with the qc option (queryconfiguration)):

C:\bin>sc qc StarTeamServer-MyStarTeam2005R2_W2K3 | find "DEPENDENCIES" 

It reveals this output:

        DEPENDENCIES       : 

Setting the dependency is also easy: use the “config” option from sc using the “depend= ” parameter (not the extra space at the end of depend=!):

C:\bin>sc config StarTeamServer-MyStarTeam2005R2_W2K3 depend= MSSQL$STARTEAM
[SC] ChangeServiceConfig SUCCESS

C:\bin>sc qc StarTeamServer-MyStarTeam2005R2_W2K3 | find "DEPENDENCIES" 

You will get this output:

        DEPENDENCIES       : MSSQL$STARTEAM

A quick reboot on the machine now gets this application event log message:

Event Type:	Information
Event Source:	StarTeamServer
Event Category:	None
Event ID:	2
Date:		7/12/2010
Time:		12:37:46 PM
User:		N/A
Computer:	W2K3-VM
Description:
StarTeam Server : StarTeam Server Service MyStarTeam2005R2_W2K3 started..

Now hopefully this will help people having similar issues as I did.

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: