Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Metrics for stored procedure execution Expand / Collapse
Author
Message
Posted Thursday, August 23, 2012 12:06 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, September 17, 2012 2:33 AM
Points: 19, 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.
Post #1348873
Posted Thursday, August 23, 2012 12:37 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 12:40 AM
Points: 7,001, Visits: 8,439
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


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- 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"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #1348881
Posted Thursday, August 23, 2012 12:47 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, July 21, 2014 12:52 AM
Points: 716, Visits: 350

please refer below link

http://www.simple-talk.com/sql/performance/how-to-identify-slow-running-queries-with-sql-profiler/
Post #1348884
Posted Thursday, August 23, 2012 3:06 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, September 17, 2012 2:33 AM
Points: 19, 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.

Post #1348960
Posted Thursday, August 23, 2012 4:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 12:40 AM
Points: 7,001, Visits: 8,439
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


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

- 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"


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #1348988
Posted Monday, August 27, 2012 4:31 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 1:01 PM
Points: 15,558, Visits: 27,932
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 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1350303
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse