One of my customers has a good number of SQL Agent jobs which reach out (through appropriate proxy accounts) to UNCs to bring files over for import. The problem is, the server the jobs reach out to is changing, and the new server will have a new name.It looks like, from some quick Google'ing, that I should be able to script out replacing instances of the server name in the msdb.sysjobsteps table (obviously, I'll test this first with a "junk" job.)My question is, has anyone else done this, and did it work? Are there any potential "gotchas" I should be on the lookout for?I'm thinking I should be able to verify the jobs / jobsteps with a simple select:[code="sql"]use [msdb];goselect *from sysjobstepswhere command like '%SERVERNAME%';[/code]Then just turn that into an appropriate UPDATE command and go.
↧