从SQL Server Management Studio连接到数据库服务器时出错

2022-03-08 00:00:00 sql-server ssms

最近,尝试从SQL Server Management Studio连接到任何SQL Server数据库时,收到错误-Service 'Microsoft.SqlServer.Management.IRegistrationService' not found (Microsoft.SqlServer.Management.SDK.SqlStudio)

我尝试更新到SQL Server Management Studio的最新版本,但没有任何更改。

完整错误堆栈如下:

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

Service 'Microsoft.SqlServer.Management.IRegistrationService' not found (Microsoft.SqlServer.Management.SDK.SqlStudio)

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

   at Microsoft.SqlServer.Management.ServiceProvider.GetService[T](IServiceProvider serviceProvider, Boolean throwIfNotFound)
   at Microsoft.SqlServer.Management.SqlStudio.Explorer.NavigationService.Initialize()
   at Microsoft.SqlServer.Management.SqlStudio.Explorer.NavigationService.GetView(String urnPath)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.<GetColumnsFromNavigationService>d__11.MoveNext()
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.AddFields(List`1 list, IEnumerable`1 fields, IDictionary`2 allValidFields, AddFieldsFlags flags)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.GetParentFields(INodeInformation source, Dictionary`2& allValidColumns)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItemWithQuery(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, String urnQuery, Boolean registerBuilder, Boolean registerBuiltItems)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItem(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)

您知道为什么会发生此错误吗?


解决方案

对我的情况有帮助的是.(版本17.9.1)

我已检查文件:

C:Users<user>AppDataRoamingMicrosoftAppEnv14.0ActivityLog.xml

在那里我找到了该目录的信息:

C:Users<user>DocumentsSQL Server Management Studio
未找到

。 我是手动创建的,而且.SSMS已开始工作。

是的我知道..。这听起来很疯狂。

相关文章