标签:set 机器名 -- exe drop 多个 快速 name sql
--windows机器名
sysprep.exe 勾选通用,并关机
--实例名
SELECT @@SERVERNAME ,serverproperty(‘servername‘)
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
SELECT @@SERVERNAME ,serverproperty(‘servername‘)
标签:set 机器名 -- exe drop 多个 快速 name sql
原文地址:http://www.cnblogs.com/justdba/p/5999598.html