During the migration of SQL databases to a new SQL Server we find that we must rename the SQL Server to the original server name.  Renaming a machine on the network is easy eough but we must also run a T-SQL script to rename the server in MS-SQL

To correct @@SERVERNAME for a default instance use the following commands:

exec sp_dropserver old_name
GO
exec sp_addserver new_name, ‘local’
GO

To correct @@SERVERNAME for a named instance:

exec sp_dropserver old_nameinstancename
GO
exec sp_addserver new_nameinstancename, ‘local’
GO