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!

Scheduled Jobs that call a certain table

Status
Not open for further replies.
Apr 18, 2002
185
US
I need to compile a list of all of the calls from scheduled jobs (or other places) that select/insert into a specific table... is there a simple way of doing this without opening up every job and looking at it?
 
I can't think of a particularly simple way, but you might be able to glean some information from the command column of msdb.dbo.sysjobsteps
If it's a stored proc call, the comman column only has "exec myproc" though, so not sure how helpful that would be.

When you say "other places", what do you mean?

~LFCfan

 
Mostly stored procedures and I was thinking if there was any other place that may make a call to that table -- maybe a web service.
 
this works for me for stored procedures

Code:
SELECT * FROM information_schema.routines r WHERE charindex('table_name_here', r.ROUTINE_DEFINITION)>0
I'm not sure what other routine_type it holds, in our case there's only procedure and function types

Just dont trust the method right-click object/Show Dependencies as I think it uses sp_depends or the sysdepends view, and this isnt alway up to date:

~LFCfan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top