USE [msdb]
GO
SELECT
j.name,
js.step_id,
js.command,
j.enabled,
j.job_id
FROM dbo.sysjobs j
JOIN dbo.sysjobsteps js
ON js.job_id = j.job_id
WHERE js.command LIKE N'%Insert search string here%'
ORDER BY j.name
Monday, 6 January 2014
Search content of SQL Server Agent Jobs
If you have many SQL Server Agent jobs on a server, it is useful to be able to search for a job programatically, based on it's contents, rather than manually viewing each step of each job. The following SQL allows you to search for code within all SQL jobs:
Subscribe to:
Post Comments (Atom)
Updating massive amount of rows whilst avoiding blocking
The following SQL is a good means to split an update on a massive table into smaller chunks, whilst reducing blocking. The method is to upda...
-
Microsoft Distributed Transaction Coordinator (abbreviated to MSDTC, or DTC) is usually very quick and simple to set up. However, it isn...
-
Migrations between SQL Servers can be laborious, and doing them manually leaves a lot of room for human error. Scripting a migration using t...
-
Scheduling SSIS packages from SQL Agent can produce the following error on a new installation of SQL Server: “Connecting to the Integration...
No comments:
Post a Comment