Export (0) Print
Expand All

How to: Set SQL Server Permissions for Debugging

This topic applies to:

Visual Studio Edition

Visual Basic

C#

C++

J#

Visual Web Developer

Express

No

No

No

No

No

Standard

No

No

No

No

No

Pro/Team

Yes

Yes

Yes

No

No

This section describes the permissions required for SQL debugging. These permissions are only those imposed by SQL debugging; there may be other permissions required elsewhere. For example, to debug a process running as a different user than your Windows login account, the account must be a member of the system administrators group for the machine. For more information, see Remote Debugging Permissions.

There are two user accounts you need to consider.

  • The application account is the user account that Visual Studio or the client application is running under. This account is a Windows user account, and must be a member of the sysadmin group in the SQL Server being debugged.

  • The connection account is the identity used to make the connection to SQL Server. This is the account you enter when you define the connection in Server Explorer or that you specify in the connection string when the application connects to a database. This account may be a Windows user account, using Windows Authentication, in which case it is the same account as the Windows account Visual Studio is running under. Or the connection account may be a SQL Server login account. For SQL Server 2005 debugging, the connection account must be a member of the sysadmin role.

To add a Windows login account as sysadmin

  • A user who already has sysadmin privileges must execute the following:

    sp_addsrvrolemember 'Domain\Name', 'sysadmin'
    

    where Domain\Name represents the Windows login account.

    NoteNote

    By default, Windows administrators on a machine running SQL Server are SQL Server sysadmins on that machine.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft