SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Metrics for stored procedure execution


Metrics for stored procedure execution

Author
Message
hamsa_apj
hamsa_apj
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 91
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.
ALZDBA
ALZDBA
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28479 Visits: 8986
Have a look at the wonderful scripts Glen provided for us .

SQL Server 2005 Diagnostic Information Queries by Glenn Berry
http://sqlserverperformance.wordpress.com/2012/06/12/sql-server-2005-diagnostic-information-queries-june-2012/

Johan


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


- How to prevent a sore throat after hours of presenting ppt ?


press F1 for solution, press shift+F1 for urgent solution :-D


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me Alien but most of the time this is me Hehe
sandeep rawat
sandeep rawat
Right there with Babe
Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)Right there with Babe (791 reputation)

Group: General Forum Members
Points: 791 Visits: 376
please refer below link

http://www.simple-talk.com/sql/performance/how-to-identify-slow-running-queries-with-sql-profiler/
hamsa_apj
hamsa_apj
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 91
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.
ALZDBA
ALZDBA
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28479 Visits: 8986
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


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


- How to prevent a sore throat after hours of presenting ppt ?


press F1 for solution, press shift+F1 for urgent solution :-D


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me Alien but most of the time this is me Hehe
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)SSC Guru (94K reputation)

Group: General Forum Members
Points: 94589 Visits: 33010
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

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search