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
需注意的是,改过之后必须要重启一下SQL 服务器才可以,这时在用
本文出自 “拼搏” 博客,请务必保留此出处http://sundysang.blog.51cto.com/280008/200186