Option to search jobs
Frankly very surprised Version 1.0 didn't have this. Doesn't even seem like it would be a feature consideration. If you have a search tool, shouldn't it be expected to search the *entire* SQL Server, not just part of it? I wonder how many people assume it searches jobs, which after all are stored in a system database, and never realize they may be missing some references?
Just want to start by saying SQL Search 1.1 is a very nice tool. I only have one issue kind of with it... it doesn't search Job Command Text. Is this something that can be added possibly?
We currently use the following query for searching & wondered if it could be put into SQL Search at all or be added to the "Others" object selector results:
SELECT j.job_id, s.srvname, j.name, js.step_id, js.command, j.enabled
FROM msdb.dbo.sysjobs j
INNER JOIN msdb.dbo.sysjobsteps js ON js.job_id = j.job_id
INNER JOIN master.dbo.sysservers s ON s.srvid = j.originating_server_id
WHERE js.command LIKE N'%' + @findText + '%'
We have started work to add the ability to search jobs. Our current plan is to have this as a separate option in the Objects dropdown.
If you’d like to help us improve this feature by taking a short phone call or remote connecting to give feedback on our latest designs, please email us at firstname.lastname@example.org and we’ll get back to you with further details.
Eric Isaacs commented
The trick isn't searching the job text as much as knowing if the job is applicable for the selected database you're searching. But even that information is in the job scripts. It seems that it would be one of the things that might be listed in the "Other" objects that SQL Search allows you to search in.
Eddie Groves commented
This is really important for digging through large unknown legacy systems where a lot of "business rules" are hidden in SQL Jobs.
Duplicate? http://redgate.uservoice.com/forums/101149-sql-search-feature-suggestions/suggestions/1468673-option-to-search-jobs - has 36 votes and counting...
Luke, I totally second you on that.
I see this shotsighted decision ammusing each time I see Developers think SQL Search does search through the jobs/job's steps. This happens about once a week and each time I need to come up with an excuse that explains how sql jobs are different from the real database objects. This usually ends up with SQL Search can't do that, but here is the script that does that.
I wonder how hard would be to add this piece of code?
INNER JOIN msdb.dbo.sysjobs ON msdb.dbo.sysjobsteps.job_id = msdb.dbo.sysjobs.job_id
WHERE command LIKE '%findme%'