Use master
Go
SELECT @ @servername;
Select SERVERPROPERTY (' servername ')
Sp_dropserver ' Bpm-server '
Go
sp_addserver ' BPM ', ' local '
__________________________________________________________________
Use master
Go
SELECT @ @servername
Select SERVERPROPERTY (' servername ')
SELECT * FROM Msdb.dbo.MSdistpublishers
DELETE from Msdb.dbo.MSdistpublishers
SELECT * FROM Msdb.dbo.MSdistpublishers
exec sp_droplinkedsrvlogin ' bpm-server ', null
exec sp_dropserver ' bpm-server ', ' droplogins '
Use master
GO
If Serverproperty (' BPM ') <> @ @servername
Begin
declare @server sysname
Set @server = @ @servername
exec sp_dropserver @server = @server
Set @server = Cast (serverproperty (' BPM ') as sysname)
exec sp_addserver @server = @server, @local = ' local '
End
Sp_dropserver ' Bpm-server '
Go
sp_addserver ' BPM ', ' local '
__________________________________________________________________
20160712001 SQL Server R2 renaming