Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to Display list of objects referrenced..

Author  Topic 

vision.v1
Yak Posting Veteran

72 Posts

Posted - 2010-07-15 : 10:28:44
Hi,

How can i find out list of stored procedure, functions which will refer to a particular table.

I would like to find out the list of stored procedures & functions not only in the current database but also which are present is another databases

For eg. if we write the following:

sp_depends Employee

It will display name and type of the object only in the current database, but i want the list which are present in another database

please give suggestions

Thanks

Kristen
Test

22859 Posts

Posted - 2010-07-15 : 10:32:14
query sys.depends? (which you can also do in the other databases)
Go to Top of Page

vision.v1
Yak Posting Veteran

72 Posts

Posted - 2010-07-15 : 10:44:37
quote:
Originally posted by Kristen

query sys.depends? (which you can also do in the other databases)



Hi,

Thanks for reply..if i write

USE Information
sp_depends Employee

It will display all the list of object like sp,functions which will refer the Employee table in the current database i.e., in this case Information database...but i also want the list of sp, functions that present in some other data base which will refer Information.dbo.Employee table
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-07-15 : 11:21:35
Did you try what I suggested?
Go to Top of Page

vision.v1
Yak Posting Veteran

72 Posts

Posted - 2010-07-15 : 12:51:11
quote:
Originally posted by Kristen

Did you try what I suggested?



can you please provide the complete query what you are saying

Thanks in Advance...
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-07-15 : 13:33:52
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82928
Go to Top of Page

vision.v1
Yak Posting Veteran

72 Posts

Posted - 2010-07-16 : 07:56:50
quote:
Originally posted by Kristen

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82928



I tried the code but its not working
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-07-16 : 08:46:46
"not working" isn't much to go on ...
Go to Top of Page
   

- Advertisement -