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 |
|
harlingtonthewizard
Constraint Violating Yak Guru
352 Posts |
Posted - 2009-01-15 : 23:17:36
|
| Listing all tables and ideally all fields used within each stored procedure. So output would look something like:Procedure Tables FieldsComments_Count UserDetails Name, PositionComments_Count UserGroup Tech, AdminComments_Count Comments Comment, CommentIDUserCount User UserID, UserName |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-15 : 23:29:45
|
| start with sp_depends |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-01-15 : 23:33:00
|
| exec sp_depends 'storedprocedurename'u will get tables used only in particular database otherdatabase tables which are used in that sp will not come |
 |
|
|
harlingtonthewizard
Constraint Violating Yak Guru
352 Posts |
Posted - 2009-01-15 : 23:39:36
|
| Thanks that does the trick, sometimes just need to know what to look for:) |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-01-15 : 23:48:20
|
ur welcome |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-15 : 23:55:04
|
| also have a look at sys.sql_modules catalog view |
 |
|
|
|
|
|