• I was unable to make use of the Phase II code, but had very good success using the code from Phase I. I am using SQL Server 2005.

    In fact, I modified the code to list the jobs, steps, whether each job was enabled, and the command text for a project on which I am working.

    SELECT

    akTables.name AS 'Table Name',

    JOB.name AS 'Job Name',

    STEP.step_name AS 'Step Name', -- include Step Name

    CASE JOB.enabled WHEN 1 THEN 'Yes' ELSE 'No' END AS 'Job Enabled', -- Job enabled?

    STEP.command AS 'Step Command'

    FROM

    msdb.dbo.sysjobs AS JOB

    INNER JOIN msdb.dbo.sysjobsteps AS STEP

    ON JOB.job_id = STEP.job_id

    RIGHT OUTER JOIN -- right join on each table name in the defined schema; NULL results indicate no jobs refer to table.

    (

    SELECT

    name

    FROM

    sys.objects

    WHERE

    (type = 'U') -- table

    AND

    (schema_id = schema_id('ak')) -- ak schema

    ) akTables

    ON STEP.command LIKE '%' + akTables.name + '%'

    In the project, my tables are separate in a schema I defined "ak". You can, of course, add sysjobs or sysjobsteps columns for more information.

    (58.30115757480578, -134.4143772125244)