Executing Stored Procedures with SSDT
Mon, Jul 29 2013 11:06
As part of your development or debugging process, you may need to execute a stored procedure from your development database. That's easy to do using the SQL Server Object Explorer that is part of the SQL Server Data Tools (SSDT) in Visual Studio 2012.
See this link for an introduction to SQL Server Object Explorer.
To execute a stored procedure from a SQL Server database using SQL Server Object Explorer:
1) Open the SQL Server Object Explorer toolbox using View | SQL Server Object Explorer from Visual Studio.
2) Drill down to your database, then the Programmability node, then to Stored Procedures.
3) Right-click on the stored procedure to execute and select Execute Procedure…
4) A Query window is displayed and the code to execute the stored procedure is generated for you. Visual Studio executes the query and displays the results of the stored procedure.
5) You can execute the stored procedure again by clicking the Execute button shown as the first icon in the query window toolbar.
Use the SQL Server Object Explorer any time you want to execute a SQL Server stored procedure.