Ssms

如何修復 SSMS 18 中的錯誤編輯作業步驟屬性?

  • December 27, 2019

每當我嘗試在 SQL Server Management Studio (SSMS) 版本 18 中編輯 SQL Server 代理作業步驟的屬性時,應用程序都會引發錯誤並且我無法繼續。我該如何解決這個錯誤?

UserVoice 文章連結:

https://feedback.azure.com/forums/908035-sql-server/suggestions/37642465-ssms-18-0-job-properties-window-click-on-step-fa

SSMS 版本 18.4:

  • SQL Server 管理工作室 15.0.18206.0
  • Microsoft 分析服務客戶端工具 15.0.1567.0
  • Microsoft 數據訪問組件 (MDAC) 10.0.18362.1
  • Microsoft MSXML 3.0 4.0 6.0
  • 微軟 Internet Explorer 9.11.18362.0
  • 微軟 .NET 框架 4.0.30319.42000
  • 作業系統 10.0.18362

完整的錯誤文本:

===================================

The system cannot find the file specified.

------------------------------
Program Location:

at Microsoft.SqlServer.Dts.Runtime.Application.get_LogProviderInfos()
at Microsoft.DataTransformationServices.DTSExecUI.Controls.LoggingCtrl..ctor(IDTSExecViewManager treePanel)
at Microsoft.SqlServer.Management.SqlManagerUI.DTSJobSubSystemDefinition.InitializeControls()
at Microsoft.SqlServer.Management.SqlManagerUI.DTSJobSubSystemDefinition..ctor(CDataContainer dataContainer, IMessageBoxProvider messageProvider)
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepSubSystems.CreateJobStepSubSystemSsis(AgentSubSystem agentSubSystem, CDataContainer dataContainer, JobStepData data, IMessageBoxProvider messageProvider)
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepSubSystems.CreateJobStepSubSystem(AgentSubSystem agentSubSystem, CDataContainer dataContainer, JobStepData data, IMessageBoxProvider messageProvider, IServiceProvider serviceProvider)
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepSubSystems..ctor(CDataContainer dataContainer, JobStepData data, IMessageBoxProvider messageProvider, IServiceProvider serviceProvider)
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.get_SubSystems()
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.FilterStepCombo(DatabaseEngineEdition engineEdition)
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.InitializeStepCombo()
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.InitializeData()
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepProperties.OnInitialization()
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SetView(Int32 index, TreeNode node)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SelectCurrentNode()
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.InitializeUI(ViewSwitcherTreeView treeView, ISqlControlCollection viewsHolder, Panel rightPane)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control)
at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(ISqlControlCollection control, IServiceProvider provider)
at Microsoft.SqlServer.Management.SqlManagerUI.JobSteps.OnDoubleClick(Object sender, MouseButtonDoubleClickedEventArgs args)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.OnMouseButtonDoubleClicked(HitTestResult htArea, Int64 nRowIndex, Int32 nColIndex, Rectangle rCellRect, MouseButtons btn, GridButtonArea headerArea)
at Microsoft.SqlServer.Management.SqlManagerUI.SqlManagerUIDlgGrid.OnMouseButtonDoubleClicked(HitTestResult htArea, Int64 rowIndex, Int32 colIndex, Rectangle cellRect, MouseButtons btn, GridButtonArea headerArea)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.OnMouseDown(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Microsoft.SqlServer.Management.UI.Grid.GridControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()

===================================

The system cannot find the file specified.

------------------------------
Program Location:

at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.get_LogProviderInfos()
at Microsoft.SqlServer.Dts.Runtime.Application.get_LogProviderInfos()

有一個MSDN 答案暗示註冊 DTS.dll 將解決該問題,但該文章是關於 SSMS 2008 的,它引用了 DTS.dll 的舊位置。

註冊 DLL 的更新版本(從 C:\Program Files\Microsoft SQL Server\130\DTS\Binn)可解決此問題。

要註冊 DLL,請執行管理員命令提示符並在包含相關 DLL 的目錄中執行此行:

regsvr32 DTS.dll

你應該得到一個消息框,上面寫著:

DTS.dll 中的 DllRegisterServer 成功。

如果您收到此錯誤:

模組“DTS.dll”已載入,但對 DllRegisterServer 的呼叫失敗,錯誤程式碼為 0x80070005。

這可能是因為您沒有管理員訪問權限。當您嘗試以管理員訪問權限執行命令提示符時,您可能會收到 UAC 提示。

我擔心會有一些 32 位與 64 位的問題,因為 DLL 位於 64 位版本 SQL Server 引擎的Program Files 文件夾中,而 SSMS 是 32 位的,但沒有似乎是個問題。

引用自:https://dba.stackexchange.com/questions/256374