How to debug stored procedure in sql server? [Resolved]

Posted by Rajeshatkiit under Sql Server on 12/19/2015 | Points: 10 | Views : 694 | Status : [Member] | Replies : 3
How to debug stored procedure in sql server?




Responses

Posted by: Rajnilari2015 on: 12/19/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
A few days back we replied to the similar question ( http://www.dotnetfunda.com/forums/show/20832/how-do-you-debug-the-stored-procedure ).

Old is Gold
--------------

By using the Print() command of TSQL ( https://msdn.microsoft.com/en-us/library/ms176047.aspx )

Since Sql Server 2008
------------------------

From SSMS,we can start the debugger by either clicking the Debug button on the Query toolbar or by clicking Start Debugging on the Debug menu or pressing ALT+F5.

From Visual Studio 2010 (Extra information, though not asked)
---------------------------------------------------------------------

Step 1: Open Server Explorer -> Server nodes-> SQL Server machine name -> SQL Servers node -> SQL Server instance -> Your database node -> stored procedures node.

Step 2: Right-click YOUR stored procedure and then click Step Into Stored Procedure.

Step 3: Press F11 to step through the stored procedure.

Hope this helps

--
Thanks & Regards,
RNA Team

Rajeshatkiit, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajnilari2015 on: 12/21/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
Glad that it has helped you (:

--
Thanks & Regards,
RNA Team

Rajeshatkiit, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Amatya on: 2/12/2016 [Member] Silver | Points: 25

Up
0
Down
Nice Man..

Feel free to share informations 9731764134
mail Id ' adityagupta200@gmail.com
Thanks

Rajeshatkiit, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response