Created
May 7, 2018 07:43
-
-
Save matt40k/f384b0791fbc18549618ed8fbf39c258 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sp_dropserver <old_name>; | |
GO | |
sp_addserver <new_name>, local; | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
@oldname varchar(255) = '<old_name>' | |
,@newname varchar(255) = '<new_name>'; | |
UPDATE | |
msdb.dbo.sysjobsteps | |
SET | |
command = REPLACE(command, @oldname, @newname) | |
WHERE | |
command LIKE '%'+@oldname+'%'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select @@servername |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
@oldname varchar(255) = '<old_name>' | |
,@newname varchar(255) = '<new_name>'; | |
UPDATE | |
OctopusDeploy.dbo.OctopusServerNode | |
SET | |
name = @newname | |
WHERE | |
name = @oldname; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment