Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search for text within jobs

Status
Not open for further replies.

cwbrumett

Programmer
Dec 9, 2005
12
US
I was wondering if there was anyway to search all of the jobs for a table name (or any text for that matter).

something similar to searching DTS via:

and searching Sprocs and views
Code:
SELECT Distinct SO.Name, SO.Type
   FROM sysobjects SO (NOLOCK)
   INNER JOIN syscomments SC (NOLOCK) on SO.Id = SC.ID
   AND SO.Type IN ( 'P', 'V' )	--search sprocs and views
   AND SC.Text LIKE '%your_text_here%'
   ORDER BY SO.Name
 
I just remembered you can script out all jobs to a file, just do that and search that file.
 
You can search the sysjobs and sysjobsteps tables.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top