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.

16 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. You are really good. Thanks Zafar..

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

    ReplyDelete
  6. works great.thanks

    ReplyDelete
  7. thanks. this worked for me too.

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

    ReplyDelete
  9. hi! great article, thanks! have you tried dbforge ide for sql server? who knows hot it debugs?

    ReplyDelete
  10. Thanks a lot for clear solution.

    ReplyDelete
  11. Still getting same error.

    ReplyDelete

Share This