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

  • Email Subscription

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

    Join 716 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:

[sourcecode language=”text”]
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.
[/sourcecode]

followed by

[sourcecode language=”text”]
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..
[/sourcecode]

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:

[sourcecode language=”text”]
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
[/sourcecode]

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)):

[sourcecode language=”text”]
C:\bin>sc qc StarTeamServer-MyStarTeam2005R2_W2K3 | find "DEPENDENCIES"
[/sourcecode]

It reveals this output:

[sourcecode language=”text”]
DEPENDENCIES :
[/sourcecode]

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=!):

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

C:\bin>sc qc StarTeamServer-MyStarTeam2005R2_W2K3 | find "DEPENDENCIES"
[/sourcecode]

You will get this output:

[sourcecode language=”text”]
DEPENDENCIES : MSSQL$STARTEAM
[/sourcecode]

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

[sourcecode language=”text”]
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..
[/sourcecode]

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

–jeroen

Leave a Comment

 

Discover more from The Wiert Corner - irregular stream of stuff

Subscribe now to keep reading and get access to the full archive.

Continue reading