Solved

time duration stored procedure is taking

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
OPENDATASOURCE 8 36
Group by correlation 4 55
How to order Highest and lowest value rows alternatively in SQL Server ? 4 45
SQL Query with Sum and Detail rows 2 42
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 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

16 Experts available now in Live!

Get 1:1 Help Now