查询以列出与特定 table 关联的作业名称和步骤
Query to list the job names and step associated with a particular table
有什么方法可以搜索和查找特定的 table 刷新的作业。
有多个 sql 代理作业和多个 steps.What 是 sql 查询以搜索所有作业并找到作业名称和步骤吗?
这是为了识别与 table 负载相关的步骤
看看这个:
use msdb
SELECT
[sJOB].[job_id] AS [JobID]
, [sJOB].[name] AS [JobName]
,step.step_name
,step.command
FROM
[msdb].[dbo].[sysjobs] AS [sJOB]
LEFT JOIN [msdb].dbo.sysjobsteps step ON sJOB.job_id = step.job_id
WHERE step.command LIKE '%MYTABLENAME%'
ORDER BY [JobName]
有什么方法可以搜索和查找特定的 table 刷新的作业。 有多个 sql 代理作业和多个 steps.What 是 sql 查询以搜索所有作业并找到作业名称和步骤吗?
这是为了识别与 table 负载相关的步骤
看看这个:
use msdb
SELECT
[sJOB].[job_id] AS [JobID]
, [sJOB].[name] AS [JobName]
,step.step_name
,step.command
FROM
[msdb].[dbo].[sysjobs] AS [sJOB]
LEFT JOIN [msdb].dbo.sysjobsteps step ON sJOB.job_id = step.job_id
WHERE step.command LIKE '%MYTABLENAME%'
ORDER BY [JobName]