十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
use master
go
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
ELSE
PRINT '实例名与主机名一致,无需修改!' ![](/upload/otherpic66/171155.jpg)