Search

Thursday, July 28, 2011

Missing server name

When name change on a machine with SQL2000 the SQL lost its name on the systemtables. The code to check what SQL think its name is:

select @@servername

If its the wrong name you can drop the name with;

sp_dropserver

To create a new name if its null;

sp_addserver 'SERVER7', local

You can also check the name with;

SELECT SERVERPROPERTY('servername')

@@servername wont give result until SQL-service is restarted. The Select query will have direct result.

No comments:

Post a Comment