Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

name of tables & views in stored procedure in sql server 2005

I have a stored procedure, I want to know the name of the tables and views use in that stored procedure, can any one suggest how can I do so.

Thanks in advance.

like image 942
Zerotoinfinity Avatar asked Jun 24 '10 13:06

Zerotoinfinity


1 Answers

You can use sp_depends but this depends on the dependency information being up to date.

Running sp_refreshsqlmodule on all objects in the database can update this if there is any missing dependency information.

like image 199
Martin Smith Avatar answered Oct 07 '22 16:10

Martin Smith