August 4, 2011 at 9:21 pm
Hi All,
Is there any way to execute the sql statements/procedure line by line (like having a break point and checking each condition/statement)????
Can someone tell me how to set a breakpoint ??
August 5, 2011 at 1:31 am
Yes, with Visual Studio.
What can I say... good luck! It's not simple at all.
Search "SQL Server 2005 debugging" with Google. Lots of good resources out there.
-- Gianluca Sartori
August 5, 2011 at 8:46 am
Or add a lot of auditing lines. Depending on the complexity of the parameters you can convert the logic to just t-sql block fairly easily. This lets you run the code repeatedly and only as much you want for testing/debugging which I am guessing is the reason for the question.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 5, 2011 at 9:13 am
Sean Lange (8/5/2011)
Or add a lot of auditing lines. Depending on the complexity of the parameters you can convert the logic to just t-sql block fairly easily. This lets you run the code repeatedly and only as much you want for testing/debugging which I am guessing is the reason for the question.
Ya, Michelle's doing it really well here.
August 5, 2011 at 9:20 am
That is an excellent example of a debug script...and the script itself is pretty awesome too. 😎
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 9, 2011 at 4:33 pm
There's the Debug mode in SSMS.
August 9, 2011 at 5:11 pm
How to: Debug T-SQL Using the SQL Server Management Studio - http://msdn.microsoft.com/en-us/library/ms241871%28v=VS.80%29.aspx
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply