Working with Data in ASP.NET 2.0 - Debugging Stored Procedures
Visual Studio provides a rich debugging experience. With a few keystrokes or clicks of the mouse, it’s possible to use breakpoints to stop execution of a program and examine its state and control flow. Along with debugging application code, Visual Studio offers support for debugging stored procedures from within SQL Server. Just like breakpoints can be set within the code of an ASP.NET codebehind class or Business Logic Layer class, so too can they be placed within stored procedures.
…
Microsoft SQL Server 2005 was designed to provide integration with the Common Language Runtime (CLR), which is the runtime used by all .NET assemblies. Consequently, SQL Server 2005 supports managed database objects. That is, you can create database objects like stored procedures and UserDefined Functions (UDFs) as methods in a Visual Basic class. This enables these stored procedures and UDFs to utilize functionality in the .NET Framework and from your own custom classes. Of course, SQL Server 2005 also provides support for TSQL database objects. SQL Server 2005 offers debugging support for both TSQL and managed database objects. However, these objects can only be debugged through Visual Studio 2005 Professional and Team Systems editions. In this tutorial we will examine debugging TSQL database objects. The subsequent tutorial looks at debugging managed database objects.
…
Visual Studio can debug stored procedures on local and remote SQL Server instances. A local SQL Server instance is one that is installed on the same machine as Visual Studio. If the SQL Server database you are using is not located on your development machine, then it is considered a remote instance. For these tutorials we have been using local SQL Server instances. Debugging stored procedures on a remote SQL server instance requires more configuration steps than when debugging stored procedures on a local instance. If you are using a local SQL Server instance, you can start with Step 1 and work through this tutorial to the end. If you are using a remote SQL Server instance, however, you will first need to ensure that when debugging you are logged to your development machine with a Windows user account that has a SQL Server login on the remote instance. Moveover, both this database login and the database login used to connect to the database from the running ASP.NET application must be members of the sysadmin role. See the “Debugging TSQL Database Objects on Remote Instances” section at the end of this tutorial for more information on configuring Visual Studio and SQL Server to debug a remote instance.
…
Website: static.asp.net | Filesize: 597kb
No of Page(s): 10
Click here to download Working with Data in ASP.NET 2.0 - Debugging Stored Procedures.
Related Tutorial
Tags: .NET, debugging, SQL Server, stored procedure
Comments
Leave a Reply