You receive a "The computer name has changed after SQL Server was installed" error message when you install Microsoft Operations Manager 2005 (899159)



The information in this article applies to:

  • Microsoft Operations Manager 2005

SYMPTOMS

When you install Microsoft Operations Manager (MOM) 2005, you may receive the following error message:
The computer name has changed after SQL Server was installed. SQL Server must be reinstalled.

CAUSE

This error occurs if the SQL server has been renamed or if the value for the server name in SQL is NULL.The MOM Prerequisite checker looks at two entries for the computer name, and the entries must match in case and in name. The prerequisite checker runs the following queries against the master database:

Select @@Servername
Select ServerProperty('machinename')

Note Leading or trailing spaces in the names in these tables also cause the comparison to fail.

RESOLUTION

To resolve this problem, follow these steps.

Note You may not have to reinstall Microsoft SQL Server to resolve this problem.
  1. Log on by using an account that has administrative credentials.
  2. Click Start, click Programs, click Microsoft SQL Server, and then click Query Analyzer.
  3. In the Connect to SQL Server dialog box, click (local) in the SQL Server list, and then click OK.
  4. In SQL Query Analyzer, type the following code:
    sp_dropserver 'old_name'
    GO
    sp_addserver 'new_name', 'local'
    GO
    Note In this code, old_name is a placeholder for the old name of the computer, and new_name is a placeholder for the new name. Type the actual old name and new name instead of these placeholders.
  5. Click Execute Query (F5) to run the query.
  6. Quit SQL Query Analyzer.
Note After you run the sp_addserver stored procedure, you must restart the SQL Server service for the change to take effect. After the server is restarted, confirm that the correct value of the new server name is returned by executing the following commands in Query analyzer:

Select @@servername Select ServerProperty('machinename')

The names returned should match in spelling and case.

For more information about how to rename a computer that is running SQL Server, see the "Renaming a Server" section in SQL Server Books Online. To download SQL Server Books Online, visit the following Microsoft Web site: For more information about how to rename a computer that is running SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:

303774 "Renaming a server" topic in SQL Server Books Online is incomplete


Modification Type:MajorLast Reviewed:9/22/2006
Keywords:kbtshoot kbprb KB899159 kbAudITPRO