Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't step into stored procedure on remote SQL Server 2008

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?

like image 915
abatishchev Avatar asked Mar 24 '10 23:03

abatishchev


People also ask

How do I debug a stored procedure in SQL Management Studio?

To debugging SP, go to database->Programmability->Stored Procedures-> right click the procedure you want to debug->select Debug Procedure.

How debug SQL stored procedure when called from C#?

Start by going to the Server Explorer and expand the Northwind database node. Next, drill down into the Stored Procedures folder, right-click on the Products_SelectByCategoryID stored procedure, and choose the Step Into Stored Procedure option from the context menu. This will start the debugger.


1 Answers

Once I disabled the firewall on both client and server, it worked.

like image 91
AMissico Avatar answered Sep 22 '22 19:09

AMissico