http://topic.csdn.net/t/20050326/12/3883164.html
if serverproperty( 'servername') <> @@servername
begin
declare @server sysname
set @server = @@servername
exec sp_dropserver @server = @server
set @server = cast(serverproperty( 'servername') as sysname)
exec sp_addserver @server = @server , @local = 'LOCAL '
end