Monday, February 7, 2011

Unable to start T-SQL Debugging. Could not attach to SQL Server Process

How to Enable TSQL Debugging in SQL SERVER ?


Click on the menu Debug >> Start Debugging
An error will be produced "Unable to start T-SQL Debugging. Could not attach to SQL Server Process"


Here is the solution to get rid of this error

Expand the SQL Sever Management Studio
Expand the Security


Right Click on the Logins
Click on New Login
A new window will appear to define the Login


Specify the Login Name.
Specify the Server roles.


Check the sysadmin Server role and then press OK.
Now Debug your Query /SP Debug >> Start Debugging

This can also be done using TSQL.
Here is the Way to do this using TSQL

sp_addsrvrolemember 'Domain\Name', 'sysadmin'
GO

EXEC master..sp_addsrvrolemember @loginame = N'Dmain-Name\Administrator', @rolename = N'sysadmin'
GO

if you are not using any domain, then try your system name.

15 comments:

  1. Thanks this article solved my problem

    ReplyDelete
  2. Thanks it solved my problem too....

    ReplyDelete
  3. Works flawlessly, thanks for the information!

    ReplyDelete
  4. tons of thanks

    ReplyDelete
  5. You are really good. Thanks Zafar..

    ReplyDelete
  6. Great... it's work fine..!!

    ReplyDelete
  7. works great.thanks

    ReplyDelete
  8. thanks. this worked for me too.

    ReplyDelete
  9. it doesn't work for server authentication ..

    ReplyDelete

Share This