Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'Logging' stored procedures/ views

Status
Not open for further replies.

sqlturbo

IS-IT--Management
Mar 11, 2002
67
US
Hi all,

I have a database with over a hundred stored procedures, some of which I'm sure, are no longer needed. Likewise for the views. Is there a way to know which stored procedures or views are still being used by the users? That would help me getting rid of the ones no longer needed. Also, is it possible to log commands run against a database?

Thanks for any help.
L'tayn

 
Hi

Use sp_depends tablename

which will list the stored procedure and trigger depended on the table.


Srinivasa Raghavan


Srinivasa Raghavan
 
sp_depends doesn't ell if a procedure has been executed or a view utilized. SQL Server doesn't track this info. You can track commands executed using a SQL Profiler. See "Monitoring with SQL Profiler" at ...

Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top