Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Find all Job Relationships with SSIS Config files Expand / Collapse
Author
Message
Posted Tuesday, March 15, 2011 10:12 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 3, 2013 6:55 PM
Points: 165, Visits: 227
Comments posted to this topic are about the item Find all Job Relationships with SSIS Config files
Post #1078770
Posted Thursday, December 5, 2013 8:44 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 9:54 AM
Points: 865, Visits: 2,381
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.
Post #1520145
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse