how do you debug the stored procedure? [Resolved]

Posted by Chamu under Sql Server on 11/27/2015 | Points: 10 | Views : 520 | Status : [Member] | Replies : 2
How do you debug the stored procedure?




Responses

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

Up
0
Down

Resolved
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

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

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

Up
0
Down
Glad that it has helped you (:

--
Thanks & Regards,
RNA Team

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

Login to post response