In SQL Server 2008 R2, an error occurred while starting debugging; the HRESULT E_FAIL call error was returned from a call to the COM component. (Mscorlib)

I am working on SQL Server 2008 R2 Express, when I use the SQL Server debugging feature on the client PC, this error occurs:

EXECUTE permission was denied for the object 'sp_enable_sql_debug', in the database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

My username is "HALI" and I have been assigned permission "public" and "db_Owner"

now after this error I assigned all available permissions. And all server roles.

Now at this time I received a new error message,

The HRESULT error E_FAIL was returned from a call to the COM component. (Mscorlib)

Now, what a solution would be for this error.

+7
3

, . sysadmin , , . , TCP UDP .

SQL

EDIT: 1

, , , . , , , . , , Remote Debugger; , , . , , , :

, , Windows.

, TCP, .., . Windows 2012, . windows 8 Prof, SSMS. , . , XYZ. Windows , , "XYZ\HALI", Windows Server. , SQL SERVER sysadmin. , , , "XYZ\HALI". SSMS Windows SQL SERVER. T-SQL .

, , / , .

Edit: 2

Login to SSMS using Windows Authentication

+6

SQL 2012 SQL 2008 R2.

, SQL 2008 R2 32- , 2 . C:\myScript.sql , :

  1. .

  2. :

    sqlcmd -S myServer\instanceNameU yourUserNameP yourPassword -i C:\myScript.sql
    

    myServer\instanceName - . SQL- , , , .

  3. .

:

+3

Several times, when I came across this error, it was always associated with a firewall. Do you work on a remote server or on a local machine? (Parenthetically, be careful when assigning all possible roles. Some of them are those that you absolutely do not need. The one you need to debug SQL is sysadmin - try disabling the other roles that you marked and just assign it. )

Debugging processes is always a pain. This ASP.NET post helped me substantially some time ago.

+1
source

All Articles