9

我在虛擬Windows Server 2008 x64上安裝了域控制器。無法步入遠程SQL Server 2008上的存儲過程

SQL Server 2008 Express x64正在Windows Server 2008 x64上運行,客戶端在Windows 7 RTM x86上運行。兩人都加入了這個領域。

我在域用戶下啓動Visual Studio 2008SQL Server Management Studio 2008。此帳戶是sysadmin上的SQL Server組的成員。

服務器在端口135-1391433-1434上有TCPUDP的防火牆例外。

Visual Studio 2008 Remote Debugger服務在服務器上啓動,Domain Admins組被允許調試。

遠程DCOM工作:我可以連接到遠程服務器,並列出它的過程中,可以切換到只顯示託管代碼等

當我開始查詢的調試短信中我得到這個錯誤:

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)

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.

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

而且使用VS步進式到存儲過程中,當我得到的第一個和這樣的:

Exception from HRESULT: 0x89710016

我有什麼做的?

+0

我的MSDN上的帖子也沒有得到答案http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/cc7de769-36ee-4b5d-8a5f-b84ce600ef2b/ – abatishchev 2010-03-29 06:21:25

+0

我看到了巧合的帖子(認識你的頭像) - MSDN現在有一個解決方案,打開FileSharing。 – 2011-08-24 04:44:21

+0

@Jeremy:在帖子上面還是別的? – abatishchev 2011-08-24 06:28:26

回答

0

您必須在數據庫上啓用遠程調試。你可以運行以下操作來完成。

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

此外,請確保您可以在調試之前連接到遠程SQLServer,因爲您的日誌指向連接問題。

+0

我已經安裝,啓動並配置了VS 2008遠程調試器。如何使用它來設置數據庫調試?連接正在創建中沒有問題。 – abatishchev 2010-03-25 23:52:13

+0

從Visual Studio中,使用服務器資源管理器連接數據庫並展開您想要調試並放置斷點的存儲過程。當你運行應用程序時,你將能夠進入並調試存儲過程。 – SoftwareGeek 2010-03-26 18:10:27

+0

我無法在VS中的服務器資源管理器中的上下文菜單中進入SP,但出現相同的錯誤 – abatishchev 2010-03-29 06:14:17

0

你能檢查一下你是否符合這個article的要求嗎?這個對我有用。

+0

感謝您的提示。我已經看到這篇文章,並做了所有描述 - 防火牆配置在兩臺機器 – abatishchev 2010-03-31 08:45:18

+1

從你得到的錯誤消息,它看起來像一個防火牆問題。你是否將sqlservr.exe等添加到例外列表中?在客戶端/服務器上使用任何第三方防火牆? – 2010-03-31 09:16:32

+0

有一個這樣的閱讀:http://www.sqlnewsgroups.net/group/microsoft.public.sqlserver.server/topic17291.aspx – 2010-03-31 09:27:48

1

一旦我禁用了客戶端和服務器上的防火牆,它就工作了。

+2

是的,但不幸的是,在現實世界中幾乎不可能禁用服務器上的防火牆。 – abatishchev 2012-08-21 06:59:13