Article ID: 815116 - Last Review: May 18, 2007 - Revision: 1.4 You cannot debug a SQL Server stored procedure in Visual Studio .NETsImportant This article contains information about modifying the registry.
Before you modify the registry, make sure to back it up and make sure that you
understand how to restore the registry if a problem occurs. For information
about how to back up, restore, and edit the registry, click the following
article number to view the article in the Microsoft Knowledge Base: 256986
(http://support.microsoft.com/kb/256986/
)
Description of the Microsoft Windows Registry SYMPTOMSIn Microsoft Visual Studio .NET, when you try to debug an ADO.NET
application, you cannot step into an associated Microsoft SQL Server
stored procedure. You do not receive any error messages. However, the stored
procedure window does not appear when you try to debug the stored
procedure. CAUSEYou may notice this behavior if your ADO.NET application already has an
active connection to your database. The database drivers that enable SQL
debugging do not verify if they have to enable SQL debugging for database
connections that are already active. Therefore, if your active connection does
not already support SQL debugging, you notice the previously-mentioned
behavior. WORKAROUNDWarning If you use Registry Editor incorrectly, you may cause serious
problems that may require you to reinstall your operating system. Microsoft
cannot guarantee that you can solve problems that result from using Registry
Editor incorrectly. Use Registry Editor at your own risk. To work around this problem, disable connection pooling. The Microsoft .NET Framework Data Provider for SQL Server automatically enables connection pooling for ADO.NET applications. To disable connection pooling, use Registry Editor to change the following registry value from 0xffffffff to 0xfffffffe: HKEY_CLASSES_ROOT\CLSID\{0C7FF16C-38E3-11d0-97AB-00C04FC2AD98}\OLEDB_SERVICES Note Be aware of the following when you make this change:
STATUS This
behavior is by design. MORE INFORMATIONSteps to reproduce the behaviorNote Create an active connection to your database before you follow these steps.
REFERENCESFor more information about SQL debugging, visit the following
Microsoft Developer Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/library/s4sszxst(vs.71).aspx
(http://msdn2.microsoft.com/en-us/library/s4sszxst(vs.71).aspx)
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base: 316569
(http://support.microsoft.com/kb/316569/
)
FIX: Cannot Step into Stored Procedure from ASP.NET Code on Windows Server 2003
817178
(http://support.microsoft.com/kb/817178/
)
INFO: Troubleshooting Tips for T-SQL Debugger in Visual Studio
316549
(http://support.microsoft.com/kb/316549/
)
HOW TO: Debug Stored Procedures in Visual Studio .NET
APPLIES TO
| Article Translations
|
Back to the top
