Microsoft KB Archive/899159

= You receive a &quot;The computer name has changed after SQL Server was installed&quot; error message when you install Microsoft Operations Manager 2005 =

Article ID: 899159

Article Last Modified on 11/14/2007

-

APPLIES TO


 * Microsoft Operations Manager (MOM) 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.  Log on by using an account that has administrative credentials. Click Start, click Programs, click Microsoft SQL Server, and then click Query Analyzer. In the Connect to SQL Server dialog box, click (local) in the SQL Server list, and then click OK.  In SQL Query Analyzer, type the following code: sp_dropserver 'old_name' GO sp_addserver 'new_name', 'local' GO Note In this code,  is a placeholder for the old name of the computer, and   is a placeholder for the new name. Type the actual old name and new name instead of these placeholders.  Click Execute Query (F5) to run the query. Quit SQL Query Analyzer.</li></ol>

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 &quot;Renaming a Server&quot; section in SQL Server Books Online. To download SQL Server Books Online, visit the following Microsoft Web site:

http://technet.microsoft.com/en-us/sqlserver/bb331756.aspx

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 &quot;Renaming a server&quot; topic in SQL Server Books Online is incomplete

Keywords: kbtshoot kbprb KB899159

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.