Find all Job Relationships with SSIS Config files

  • Comments posted to this topic are about the item Find all Job Relationships with SSIS Config files

  • Very interesting.

    You've got some odd unprintable characters in there - I replaced them with spaces, and then have the following initial comments:

    Why give it a parent job name? I'd think looping through every job as if it were the parent job would also yield valuable information if you're looking for "every job that calls job X" or the more general "Every job any job calls", as opposed to your question of "every job that is called by job X"

    substring(Command, (29), (Len(Command)-29 ) ) AS 'Child_Job_Name'

    is specific to your particular system. You should instead find the arguments for sp_start_job, which may be either named or positional.

    AND sjs.command LIKE 'EXEC msdb.dbo.sp_start_job%'

    is again specific - try LIKE '%sp_start_job%'. There is also no provision to detect if someone has an sp_start_job call inside a stored procedure called by the agent job.

    ,Left(substring(sjs.Command, (CHARINDEX('/CONFIGFILE', sjs.Command) + 13), (CHARINDEX('dtsConfig"', sjs.Command) + 9) -(CHARINDEX('/CONFIGFILE', sjs.Command) + 13) ), 256) AS 'Config_File'

    I know little about SSIS, but you might want to see if the offsets used are specific to your system as well.

    For both offset based parse strings as well as the LIKE clause, I would recommend some mix of CHARINDEX, REVERSE, LEN, DATALENGTH, RTRIM, LTRIM, PATINDEX, etc. etc. to be more general - perhaps you'll find a job step of your own that has an extra space, a comment before the executing line, or some other interesting artifact.

  • Thanks for the script.

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

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