Solved

time duration stored procedure is taking

Posted on 2008-06-18
4
261 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now