Is there a way to search the SQL Server agent jobs, at the same time with a SQL query, for a specific table name?
Something like this:
Select top 100 *
from job_1
where definition like '%table_1%'
but instead of 1 job, it's all of the jobs?
Is there a way to search the SQL Server agent jobs, at the same time with a SQL query, for a specific table name?
Something like this:
Select top 100 *
from job_1
where definition like '%table_1%'
but instead of 1 job, it's all of the jobs?
SQL Agent jobs are stored in the msdb
database.
If I understand your intention, this should give you a start:
select j.name JobName, s.step_name StepName
from msdb.dbo.sysjobsteps s
join msdb.dbo.sysjobs j on j.job_id=s.job_id
where s.command like '%findme%'