statistic data about procedures

  • Follow


Hello there

On sql server 2005 there are system tables which gives me exact data about 
table activities: select, update, delete, insert...

it gives me good idea about activity of server.

Is there also activities table about store procedures as well? on 2005 or 
2008 


0
Reply Roy 12/9/2009 7:54:49 AM

Roy Goldhammer (roy@top.com) writes:
> On sql server 2005 there are system tables which gives me exact data about 
> table activities: select, update, delete, insert...
> 
> it gives me good idea about activity of server.
> 
> Is there also activities table about store procedures as well? on 2005 or 
> 2008 
 
In SQL 2008 there is a DMV sys.dm_exec_procedure_stats.


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
0
Reply Erland 12/9/2009 8:12:52 AM


In SQL Server 2005 you can try  the sys.dm_db_index_usage_stats data
management view, look at the column last_user_update, you can also see when
the table was last accessed ......


SELECT
    last_user_seek = MAX(last_user_seek),
    last_user_scan = MAX(last_user_scan),
    last_user_lookup = MAX(last_user_lookup),
    last_user_update = MAX(last_user_update)
FROM
    sys.dm_db_index_usage_stats
WHERE
    [database_id] = DB_ID()

    -- AND OBJECTPROPERTY(object_id, 'IsMsShipped') = 0



"Roy Goldhammer" <roy@top.com> wrote in message 
news:uGA8jTKeKHA.2596@TK2MSFTNGP04.phx.gbl...
> Hello there
>
> On sql server 2005 there are system tables which gives me exact data about 
> table activities: select, update, delete, insert...
>
> it gives me good idea about activity of server.
>
> Is there also activities table about store procedures as well? on 2005 or 
> 2008
> 


0
Reply Uri 12/9/2009 10:37:16 AM

2 Replies
174 Views

(page loaded in 0.124 seconds)


Reply: