首页 > 代码库 > VM环境下,快速复制多个SQLServer实例,环境调整

VM环境下,快速复制多个SQLServer实例,环境调整

--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‘)

VM环境下,快速复制多个SQLServer实例,环境调整