无法单步执行远程 SQL Server 2008 上的存储过程
我在虚拟 Windows Server 2008 x64
上安装了一个域控制器。
SQL Server 2008 Express x64
在 Windows Server 2008 x64
上运行,客户端在 Windows 7 RTM x86
上运行。两者都已加入该域。
我在域管理员用户下启动 Visual Studio 2008
和 SQL Server Management Studio 2008
。此帐户是 SQL Server
上 sysadmin
组的成员。
服务器在端口 135-139
和 1433-1434
上对 TCP
和 UDP
都有防火墙例外。
在服务器上启动 Visual Studio 2008 Remote Debugger
服务,并允许 Domain Admins
组进行调试。
远程 DCOM 有效:我可以连接到远程服务器并列出其进程,可以切换为仅显示托管代码等。
当我开始调试 SMS 中的查询时,我收到此错误:
无法启动调试器错误 HRESULT 调用返回 E_FAIL 到 COM 组件。 (mscorlib) 程序 地点:
在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 错误代码,IntPtr错误信息)
在 Microsoft.SqlServer.Management.UI.VSIntegration.DebugSession.DebugCallbacks.OnSqlInitializeDebuggingEvent(ISqlInitializeDebuggingEvent sqlInitializeDebuggingEvent)
在 Microsoft.SqlServer.Management.UI.VSIntegration.DebugSession.DebugCallbacks.Microsoft.VisualStudio.Debugger.Interop.IDebugEventCallback2.Event(IDebugEngine2 调试引擎、IDebugProcess2 调试进程,IDebugProgram2 调试程序,IDebugThread2 debugThread,IDebugEvent2 debugEvent, 指导& riidEvent,UInt32 属性)
和
无法访问 SQL Server 调试界面。视觉效果 Studio 调试器无法连接到 远程计算机。防火墙可能是 阻止通过 DCOM 进行通信 远程计算机。请参阅帮助 寻求帮助。
和
无法启动程序 MSSSQL://server.mydomain.local/master/sys/=0
当使用 VS 进入存储过程时,我得到第一个:
HRESULT 异常:0x89710016
我该怎么办?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一旦我禁用了客户端和服务器上的防火墙,它就起作用了。
Once I disabled the firewall on both client and server, it worked.
您必须在数据库上启用远程调试。您可以运行以下命令来执行此操作。
另外,请确保在调试之前可以连接到远程 SQLServer,因为您的日志指向连接问题。
You have to enable remote debugging on the database. You could run the following to do that.
Also, make sure you can connect to the remote SQLServer before you debug, since your logs point to a connection issue.