如何在SQL Server 2005中找到未使用的存储过程列表? [英] How to find the list of unused stored procedures in SQL Server 2005?

查看:84
本文介绍了如何在SQL Server 2005中找到未使用的存储过程列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要找出SQL Server 2005没有使用的存储过程列表。

I发现SQL server 2008有一个名为sys.dm_exec_procedure_stats的东西。



你能不能在这里建议你的思想来为SQL Server 2005做同样的工作。 />




非常感谢。

Hi,

I need to find out the list of stored procedures which are not in use for SQL server 2005.
I found there is something called "sys.dm_exec_procedure_stats " for SQL server 2008.

Can you please suggest your ides here to do the same job for SQL server 2005.


Many Thanks.

推荐答案

AFAIK,您可以收集的唯一统计数据2005年正在使用sys.dm_exec_query_stats(这是自上次重新启动SQL以来。使用它比sys.dm_exec_procedure_stats更复杂,这可能是它在2008年推出的原因......:笑:



这可能有所帮助: http: //sqlserverperformance.wordpress.com/2006/11/16/sql-server-2005-stored-procedure-execution-statistics/ [ ^ ]

但是我还没试过 - 我不喜欢2005年已经很久没有了!
AFAIK, the only stats you can gather in 2005 are using sys.dm_exec_query_stats (which are only since the last SQL restart. It's more complex to use than sys.dm_exec_procedure_stats which is probably why it was introduced in 2008...:laugh:

This might help: http://sqlserverperformance.wordpress.com/2006/11/16/sql-server-2005-stored-procedure-execution-statistics/[^]
But I haven't tried it - I don;t have 2005 and haven't had it for a long time!


这篇关于如何在SQL Server 2005中找到未使用的存储过程列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆