Feature Only in Enterprise Edition SQL source code debugging is supported only in Visual C++ Enterprise Edition. For more information, see Visual C++ Editions.
This example assumes the following:
To create the SQL Debugging example “Hello World”
The SQL Data Source dialog appears.
For example, if you have a default SQL Server setup on your local workstation, you can use the “pubs” database by clicking the Machine Data Source tab and selecting “pubs”.
You can click Options to change to any of the available databases. If you have a default setup, for the “pubs” database you can use Login Id “sa” and leave the Password blank.
In the Data View pane of the project workspace, expand the project and select the database. For example, select “pubs(servername)” where “servername” is the name of your SQL Server.
The Insert Database Item dialog appears.
The prototype for the HelloWorld stored procedure appears in the SQL editor.
CREATE PROCEDURE HelloWorld AS
PRINT 'Hello, world!'
RETURN (0)
The stored procedure named “HelloWorld” is saved in the Stored Procedures folder associated with the database.
You have successfully debugged your first SQL stored procedure.