SQL Server Performance Forum – Threads Archive
DEBUG a Stored Procedure.Hi Gurus’
Can you pleas explain me How to Debug a Stored Procedure. Like, What I need to do to Debug a Stored Procedure. Please Explain. Thanks
In Query Analyser, Press F8 to show the object browser. Expand the DB that has the stored proc in it then expand the stored procedures. Right click on the one you want to debug and select debug. You will then be propted to enter values for the valiables in the procedure (From memory, you need to enter NULL for any OUTPUT variables). Use the Step into function to step through the proc and find any errors. You can also copy the code (everything after the AS), create valiables for the input/output and run it as a query. THis lets you put in PRINT commands to see what is happening Hope this helps! Ben
… and more about herehttp://www.15seconds.com/issue/050106.htm what Ben explained the process. Satya SKJ
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.