views:

705

answers:

2

I have a domain controller installed on virtual Windows Server 2008 x64.

SQL Server 2008 Express x64 is running on Windows Server 2008 x64 and client on Windows 7 RTM x86. Both have joined the domain.

I'm starting both Visual Studio 2008 and SQL Server Management Studio 2008 under domain admin user. This account is a member of group sysadmin on SQL Server.

Server has firewall exceptions for both TCP and UDP on ports 135-139 and 1433-1434.

Visual Studio 2008 Remote Debugger services is started on server and Domain Admins group is allowed to debug.

Remote DCOM works: I can attach to remote server and list it's processes, can switch to show only managed code, etc.

When I'm starting debugging of a query in SMS I'm getting this error:

Failed to start debugger Error HRESULT E_FAIL has been returned from a call to a COM component. (mscorlib) Program Location:

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)

at Microsoft.SqlServer.Management.UI.VSIntegration.DebugSession.DebugCallbacks.OnSqlInitializeDebuggingEvent(ISqlInitializeDebuggingEvent sqlInitializeDebuggingEvent)

at Microsoft.SqlServer.Management.UI.VSIntegration.DebugSession.DebugCallbacks.Microsoft.VisualStudio.Debugger.Interop.IDebugEventCallback2.Event(IDebugEngine2 debugEngine, IDebugProcess2 debugProcess, IDebugProgram2 debugProgram, IDebugThread2 debugThread, IDebugEvent2 debugEvent, Guid& riidEvent, UInt32 attribute)

and

Unable to access the SQL Server debugging interface. The Visual Studio debugger cannot connect to the remote computer. A firewall may be preventing communication via DCOM to the remote computer. Please see Help for assistance.

and

Unable to start program MSSSQL://server.mydomain.local/master/sys/=0

And when stepping-in into a stored procedure using VS I'm getting the first one and this:

Exception from HRESULT: 0x89710016

What have I do?

A: 

You have to enable remote debugging on the database. You could run the following to do that.

%ProgramFiles%\Microsoft SQL Server\100\Shared\1033\rdbgsetup.exe

Also, make sure you can connect to the remote SQLServer before you debug, since your logs point to a connection issue.

SoftwareGeek
I have already installed, started and configured VS 2008 Remote Debugger. How to setup database debugging using it? Connection is being created without problems.
abatishchev
SoftwareGeek
I can't step into a SP from it's context menu in Server Explorer in VS with the same errors
abatishchev
A: 

can you check if you meet the requirements of this article? it works for me.

schrodinger's code
Thanks for tip. I already saw this article and did everything described - firewall is configured on both machines
abatishchev
from the error message you got, it looks like a firewall issue. Have you added the sqlservr.exe etc to the exception list? any third party firewall using on both client/server?
schrodinger's code
have a read of this: http://www.sqlnewsgroups.net/group/microsoft.public.sqlserver.server/topic17291.aspx
schrodinger's code
have you done the following?A user who already has sysadmin privileges must execute the following:sp_addsrvrolemember 'Domain\Name', 'sysadmin'
schrodinger's code
I added port 1433,1434 both TCP and UDP on server's firewall. Client's firewall is switched off. VS/SMS are running under domain admin user. He is also sysadmin. SQL Server is running under NetworkSystem. Have I to reconfigure to run it under a domain user?
abatishchev