PRINT @@servername
exec sp_helpserver
exec sp_dropserver 'MISVIR\SQLEXPRESS', 'droplogins'
go
exec sp_addserver 'Dragon-Xiong-03\SQLEXPRESS','local'
exec sp_helpserver
exec sp_dropserver 'MISVIR\SQLEXPRESS', 'droplogins'
go
exec sp_addserver 'Dragon-Xiong-03\SQLEXPRESS','local'
当计算机改名时,SQL Server 实例未修正情况下,PRINT @@servername 为原先的计算机名。