How to find a string in a job step

  • Hello,

    We are going to be replacing one of our SQL servers with completely new hardware. The new instance will have a different name so I'd like to identify all our SQL jobs, stored procedures, & SSIS packages that point to the old server. I have gotten all the stored procedures that need to be updated however I havenโ€™t had much luck find out how to search for a string to identify which SQL jobs or SSIS packages which may have code that references the old server. Any suggestions, help, or sample code would be appreciated.

    Thanks.

  • Hi,

    to find a string in a job step you could use this query:

    use msdb

    select * from sysjobsteps

    where command like '%your_old_server_name%'

    To find the SSIS-Packages referencing your old server you could try to search the string "yourServerName" with the windows search.

    Hope this helps ๐Ÿ™‚

  • Thanks. That was exactly what I needed for searching through the job steps. I'm searching for the server name via the windows search now but wasn't sure if it would pick anything up since none of our SSIS packages are deployed to the file system. Thanks again. ๐Ÿ™‚

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply