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 |
|
hbharath
Starting Member
9 Posts |
Posted - 2007-09-17 : 10:48:52
|
| Hi, I got a request from a devloper asking, how can he find out what tables his stored procedure his using, so he can remove unwanted SP which are using old tables in the database.Bharath JrDBA |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-09-17 : 10:55:25
|
You can use sp_depends as the least help but that's not very reliable. Probably you can query syscomments table to find out tables referred by SPs.Select object_name(id) from syscomments where text like '%oldtable1%' and objectproperty(id, 'IsProcedure') Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-09-17 : 11:21:07
|
| it seems that sysdepends has been improved in sql server 2005._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
hbharath
Starting Member
9 Posts |
Posted - 2007-09-17 : 12:09:12
|
| Thanks Harsh & spirit 1. I hope dis will help d devloper.Bharath JrDBA |
 |
|
|
|
|
|