As to the long running procedure, you can bring up SQL Server Profiler again and add in the event "SP:StatementStarting" and "SP:StatementCompleted." This will show you each command within the stored procedure and how long each command takes. You can then find the command with the high run time and tune that specific query. Normally, this will be caused by incorrect indexing on one or more tables used by the query.
Dig Deeper on SQL Server Stored Procedures
Related Q&A from Denny Cherry
Discover a tool that synchronizes two SQL Server databases allowing changes to one SQL Server database to update on the other. Continue Reading
Planning an upgrade to SQL Server 2008? Our expert weighs in on advantages and hardware requirements you should consider before upgrading to SQL ... Continue Reading
After installing SQL Server 2005, the SQL Server tools may not appear in the start menu. Our expert explains how to troubleshoot this problem. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.