Why do I get the error: "Msg = Could not find server "ServerName" in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers." ?

0 Likes

Problem:

Why do I get the error: "Msg = Could not find server "ServerName" in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers." ?

Resolution:


  • Product Name: StarTeam
  • Product Version: All
  • Product Component: Server
  • Platform/OS Version: N/A


The cause of this error message and the failure of the StarTeam serverto start is due to the machine name of the SQL server configurationchanging. As a result of this the new machine name is not listed in theserver table of the SQL database.

If you check the sever log file you will see the following error message:

Exception thrown from Unknown: Class = CDBException, Code = 4294967295(0xffffffff)
Msg = Could not find server "ServerName" in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers. [Function Name] = CStDbCatalog::UpdateObjectSchema
[ODBC Error] = State:37000,Native:7202,Origin:[Microsoft][ODBC SQL Server Driver][SQL Server]

To check if the server is listed correctly in the database you can run the SQL code:

SELECT * FROM SYS.SYSSERVERS

and this will output the entire list of servers registered.
Note: The above command is only applicable to SQL Server 2005 (for previous versions, remove the SYS. section). Also, please ensure that this command is executed against the "master" database.

To fix this issue and to ensure that you can start the StarTeamserver run the code below to ensure that the new server name is set inthe database table.

EXEC SP_DROPSERVER , droplogins
EXEC SP_ADDSERVER

Check with other teams to ensure that this will not affect otherapplications that host their database on the same MS SQL server.

NOTE: It is also possible to resolve this issue by uninstalling and reinstalling the SQL Server software. Be sure to backup all of the databases or make sure that the MDF and LDF files are backed up already so you can re-attach the databases after reinstalling the SQL Server software.

Since this is a SQL Server 2005 issue, escalate the issue with Microsoft Support if the issue persists.



Old KB# 28924
Comment List
Related
Recommended