Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

System table and Stored Procedure

Posted on 2007-03-26
2
Medium Priority
?
196 Views
Last Modified: 2010-03-19
How can I find the list of  stored procedures which are using a certain table in database?
I have 100 SPs in one database and I am looking for the SPs which are using a table called"Patients".. Is there a system table that has this kind of information in SQL server 2005 so that I don;t have to open up each SP one by one?
0
Comment
Question by:jung1975
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
ksaul earned 2000 total points
ID: 18793511
declare @table varchar(256)
set @table = 'yourtable'

select name
from sysobjects o
inner join syscomments c on o.id = c.id
where c.text like '%' + @table + '%'
and o.type = 'p'
0
 
LVL 10

Assisted Solution

by:ksaul
ksaul earned 2000 total points
ID: 18793536
In SQL Management Studio you can also get a list of sps using a table if you right click the table in the Object Explorer and select "View Dependencies"
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question