Solved

time duration stored procedure is taking

Posted on 2008-06-18
4
296 Views
Last Modified: 2010-04-21
Can i know particular stored procedure is taking time to execute .
Basically want to know how much time it takes to complete.
Iam using sql server 2005 std edition ,
0
Comment
Question by:Sandeepiii
  • 2
4 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 250 total points
ID: 21812057
You can use SQL Profiler w/ the event SP:Completed to track this....make sure you set a filter on the ObjectName column.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 21812099
Hello Sandeepiii,

Another way would be to log the steps your sproc is taking in a "log table".  For example, you could insert
a row at the start of the procedure and at the end of the procedure, each time using GETDATE() to populate
a time stamp.  (You could also log intermediate steps if you are so inclined.)

Regards,

Patrick
0
 

Author Closing Comment

by:Sandeepiii
ID: 31468303
thanks
0
 

Author Comment

by:Sandeepiii
ID: 21812132
thanks for the answer
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question