SQL Server Performance Forum – Threads Archive
Stored procedures for a table???
Hi,<br /><br />1.I have a table in one of the data bases of sql server 2005.<br /> I want to know how many stored procedures are involved in using this table.<br /><br />Is there any way we can do it.<br /><br />2. Also i have a primary key for this table for example "empid"<br /> How do i know how many and what tables are using this pk as their fk’s<br /><br />thanks[<img src=’/community/emoticons/emotion-1.gif’ alt=’![Smile :) :)](styles/default/xenforo/smilies/smile.png)
Answer to your second question is sp_fkeys TableName i am not sure about the first one… Madhu
sp_depends <tablename> for first one. ***********************
Dinakar Nethi
SQL Server MVP
***********************
Thank you, it helped me<br /><img src=’/community/emoticons/emotion-1.gif’ alt=’
![Smile :) :)](styles/default/xenforo/smilies/smile.png)
sp_depends is not always dependable <img src=’/community/emoticons/emotion-1.gif’ alt=’
![Smile :) :)](styles/default/xenforo/smilies/smile.png)
I agree with Mohammed, search for string from syscomments table instead. Thanks, Name
———
Dilli Grg (1 row(s) affected)
If you know what I mean.[<img src=’/community/emoticons/emotion-5.gif’ alt=’
![Wink ;) ;)](styles/default/xenforo/smilies/wink.png)
Thank you,<br />You are right, after changing to the above query it showed me 2 more stored proc’s<br /><br /><img src=’/community/emoticons/emotion-1.gif’ alt=’
![Smile :) :)](styles/default/xenforo/smilies/smile.png)
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by i.netdeveloper</i><br /><br />Thank you,<br />You are right, after changing to the above query it showed me 2 more stored proc’s<br /><br /><img src=’/community/emoticons/emotion-1.gif’ alt=’
![Smile :) :)](styles/default/xenforo/smilies/smile.png)
![Smile :) :)](styles/default/xenforo/smilies/smile.png)
]]>