Skip to content

Instantly share code, notes, and snippets.

@osya
Created December 13, 2014 17:19
Show Gist options
  • Save osya/1cdb5fb76c01603c35c4 to your computer and use it in GitHub Desktop.
Save osya/1cdb5fb76c01603c35c4 to your computer and use it in GitHub Desktop.
Search through SQL Agent Jobs (Поиск по джобам) #SQL
USE [msdb]
GO
SELECT j.job_id,
s.srvname,
j.name,
js.step_id,
js.command,
j.enabled
FROM dbo.sysjobs j
JOIN dbo.sysjobsteps js
ON js.job_id = j.job_id
JOIN master.dbo.sysservers s
ON s.srvid = j.originating_server_id WHERE js.command LIKE N'%KEYWORD_SEARCH%'
GO
URL: http://sqltidbits.com/scripts/search-sql-server-agent-job-steps-specific-keyword-text-or-stored-procedure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment