Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging Stored Procedure - TimeStamp

Status
Not open for further replies.

not4google

Programmer
Nov 6, 2006
15
GB
Hi all,

I have a huge Stored Proc (T-SQL) that I need to get some information on. I want to put in print statements at specific points of the procedure to get back the timestamp,

How can I get the timestamps of specific points?

GETDATE()?

Thanks for any suggestions,
 
Currently I have the following which seems pretty useful:

SET STATISTICS TIME ON
--Code here
SET STATISTICS TIME OFF
 
At strategic points within the code, you could put...

Print 'Here: ' + Convert(VarChar(30), GetDate(), 121)

Print statements get put in to the 'messages' tab with Query Analyzer and the new Management Studio.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top