You receive a "Cannot debug stored procedures" error message when you try to debug a SQL Server stored procedure in Visual Studio 2005 or in Visual Studio .NET (836734)
The information in this article applies to:
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio .NET (2003), Professional Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition, when used with:
- the operating system: Microsoft Windows Server 2003, Enterprise Edition
- Microsoft Visual Basic 2005
SYMPTOMSYou use Microsoft Windows Terminal Services to log on as a
non-administrator to a computer that is running Microsoft Windows Server 2003.
In the Windows Terminal Services session, when you use Microsoft Visual Studio 2005 or Microsoft Visual Studio
.NET to try to debug a Microsoft SQL Server stored procedure that is on a
remote computer, you may receive the following error message: Cannot
debug stored procedures because the SQL Server database is not setup correctly
or user does not have permission to execute master.sp_sdidebug. Run SQL Server
setup or contact database administrator. WORKAROUNDTo work around this problem, assign the SeCreateGlobalPrivelege user right to the Windows Server 2003 user account that you want
to use to perform SQL debugging. To assign the SeCreateGlobalPrivelege user right to the user account, add the user account to the
security setting for the Create global objects policy. To do this, follow these steps:
- Make sure that the user account is a member of the
following groups:
- Users
- Remote Desktop Users
- Debugger Users
- VS Developers
- Add the user account to the security setting for the Create global objects policy. To do this, follow these steps:
- Click Start, point to
Administrative Tools, and then click Local Security
Policy.
- In the left pane of the Local Security
Settings console, expand Local Policies, and then
click User Rights Assignment.
- In the right pane of the Local Security
Settings console, right-click Create global objects,
and then click Properties. The Create global objects
Properties dialog box appears.
- Click Add User or Group. The
Select Users or Groups dialog box appears.
- In the Enter the object names to
select box, type the name of the user account, and then click
OK.
- In the Create global objects
Properties dialog box, click OK.
- On the File menu of the Local
Security Settings console, click Exit.
STATUS This
behavior is by design.REFERENCESFor more information, visit the following Microsoft
Developer Network (MSDN) Web sites:
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
316549
How to debug stored procedures in Visual Studio .NET
815116 You cannot debug a SQL Server stored procedure in Visual Studio .NET
316569 FIX: Cannot step into stored procedure from ASP.NET code on Windows Server 2003
817178 Troubleshooting tips for T-SQL Debugger in Visual Studio .NET
Modification Type: | Minor | Last Reviewed: | 10/3/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbSysSettings kbSecurity kbpolicy kbUser kbTSQL kbTermServ kbStoredProc kberrmsg kbDebug kbinterop kbprb KB836734 kbAudDeveloper |
---|
|