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.
Author |
Topic |
vision.v1
Yak Posting Veteran
72 Posts |
Posted - 2010-06-25 : 12:28:29
|
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 databasesFor eg. if we write the following:sp_depends EmployeeIt will display name and type of the object only in the current database, but i want the list which are present in another databaseplease give suggestions Thanks |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2010-06-25 : 14:21:29
|
I don't know of a tool that does that does this. We make use of a GREP like tool from RedGate named SQL Search that searches through the object definitions for a specific string (e.g., "Employee"). You would need to know where to apply your searches. The tool was free but was also targeted for commercialization so it may be charged for now.=======================================A couple of months in the laboratory can save a couple of hours in the library. -Frank H. Westheimer, chemistry professor (1912-2007) |
 |
|
vision.v1
Yak Posting Veteran
72 Posts |
Posted - 2010-06-27 : 05:05:36
|
quote: Originally posted by Bustaz Kool I don't know of a tool that does that does this. We make use of a GREP like tool from RedGate named SQL Search that searches through the object definitions for a specific string (e.g., "Employee"). You would need to know where to apply your searches. The tool was free but was also targeted for commercialization so it may be charged for now.=======================================A couple of months in the laboratory can save a couple of hours in the library. -Frank H. Westheimer, chemistry professor (1912-2007)
Thanks for reply... don't we have any sql command in sql server 2005 like SP_DEPENDS |
 |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-06-27 : 06:22:41
|
sp_depends is in SQL 2005, but it's only for dependencies in the current database, and it's so often wrong as to be near useless. If you want cross-database dependencies, you'll need a third party tool or really complex hand-written scripts.--Gail ShawSQL Server MVP |
 |
|
urzsuresh
Starting Member
30 Posts |
Posted - 2010-06-28 : 02:24:47
|
quote: Originally posted by vision.v1 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 databasesFor eg. if we write the following:sp_depends EmployeeIt will display name and type of the object only in the current database, but i want the list which are present in another databaseplease give suggestions ThanksHello Friend,Kindly try below querySELECT Name FROM sys.procedures WHERE OBJECT_DEFINITION(object_id) LIKE '%TableName%'
Suri |
 |
|
vision.v1
Yak Posting Veteran
72 Posts |
Posted - 2010-06-28 : 06:30:07
|
quote: Originally posted by urzsuresh
quote: Originally posted by vision.v1 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 databasesFor eg. if we write the following:sp_depends EmployeeIt will display name and type of the object only in the current database, but i want the list which are present in another databaseplease give suggestions ThanksHello Friend,Kindly try below querySELECT Name FROM sys.procedures WHERE OBJECT_DEFINITION(object_id) LIKE '%TableName%'
Suri
No luck...Displaying 0 records |
 |
|
dvdtknsn
Starting Member
2 Posts |
Posted - 2010-06-29 : 17:36:21
|
SQL Search is completely free to use. There may be a commercial version at some point in the future but I can confirm that there there are no plans to disable the free version.At the moment you can search a specific database or all databases on your instance. There is a feature request on the backlog to specify a subset of databases, but I can't tell you when this might be implemented. Please post any enhancement requests to the Red Gate support forums.http://www.red-gate.com/products/sql_search/index.htmKind regards,David AtkinsonRed Gate Software |
 |
|
|
|
|
|
|