Created On:  15 Novemeber 2010

Problem:

StarTeam server fails to start and the server log reports the error:

Unexpected Condition: Expression: ID.GetID() == 0, File: .\ServerSettingsObjectSet.cpp

Resolution:

One known cause of this error is two StarTeam servers attempting to access and write to the same backend database. This can be confirmed by the following entries in the server log:

10        00000008  2010-11-10 16:45:21  Unexpected Condition: Expression: ID.GetID() == 0 File: .\ServerSettingsObjectSet.cpp
11        00000004  2010-11-10 16:45:21  Exception thrown from Unknown: Class = CStServerException, Code = 1002(0x000003ea)
Msg = The session configuration file does not match the database (GUIDs are different).

12        00000004  2010-11-10 16:45:21  Exception handled at CStServer::Preload: Class = CStServerException, Code = 1002(0x000003ea)
Msg = The session configuration file does not match the database (GUIDs are different).
 
The server will shut down as illustrated below:
13        00000001  2010-11-10 16:45:21  ***** Initiating Server shutdown *****
14        00000001  2010-11-10 16:45:21  Background server threads shut down.
15        00000001  2010-11-10 16:45:21  Network connections closed. The server is no longer accepting client commands.
16        00000001  2010-11-10 16:45:21  The connection manager shut down.
17        00000001  2010-11-10 16:45:21  Server components shut down and unloaded.
18        00000001  2010-11-10 16:45:21  The project manager shut down.
19        00000001  2010-11-10 16:45:21  The security manager shut down.
20        00000001  2010-11-10 16:45:21  The mail server shut down. 
 
This will cause the database to drop necessary tables:

21        00000004  2010-11-10 16:45:21  Exception thrown from Unknown: Class = CDBException, Code = 4294967295(0xffffffff)  Msg = Invalid object name 'CTABLES'.
The cursor was not declared. ODBC Error] = State:S0002,Native:208,Origin:[Microsoft][SQL Native Client][SQL Server]
State:37000,Native:16945,Origin:[Microsoft][SQL Native Client][SQL Server]

The DB connection is then closed:
22        00000001  2010-11-10 16:45:21  Database connections closed.
The database is no longer in use.

To fix this ensure that the DSN that you have setup for the StarTeam server is pointing to the correct database.

Open CONTROL PANEL | ADMINISTRATIVE TOOLS | DATASOURCES (ODBC) | SYSTEM DSN

Ensure that the name specified in the System DSN matches the DBServerName entry in the starteam-server-configs.xml file. For example:

‹OPTION name="DBServerName" value="DSN Name" /›
‹OPTION name="DBServerName" value="DSN Name" /›

Incident #2485922