August 23, 2012 at 12:06 am
Hi All,
We have a SQL server 2005 database with 2000 stored procedure and would to perform the performance tuning for SP.
As intial step, would like to take the detailed metrics related to stored procedure execution.So, that i can prioritize the stored procedures for tuning. Also, i would like to know the time taken by stored procedures, or the amount of resources used in their execution.
Please do needful. Thanks in Advance.
August 23, 2012 at 12:37 am
Have a look at the wonderful scripts Glen provided for us .
SQL Server 2005 Diagnostic Information Queries by Glenn Berry
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
August 23, 2012 at 12:48 am
August 23, 2012 at 3:06 am
Hi All,
Thanks for your response. As a developer, i would like get the metrics for stored procedure execution.
SQL profiler and other stuff mentioned above replies are not accessible for developers.
August 23, 2012 at 4:07 am
You'll need to be granted
VIEW SERVER STATE
and
VIEW DATABASE STATE
to be able to use the mentioned DMO in Glens script.
We grant these privileges to our devs (dev and qa instances) , so they are able to have a look at performance themselves.
In many cases Sr dev also have these privileges on prod instances.
(because they have been informed some DMO may hurt performance)
If you don't have these privileges, ask your dba/sysadmin to run the script for you and provide the results.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
August 27, 2012 at 4:31 am
In order to collect a meaningful set of data, you're going to need access to the server. You can look at the information in dynamic management objects (DMO) such as sys.dm_exec_query_stats which will give you an aggregate of performance metrics for all queries currently in cache. But it requires advanced permissions. Same thing with using a server-side trace to collect the data (don't point Profiler at a production server). To gather these metrics you either need permissions from the administrators or you need to work with them to get the metrics.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply