Silly John
Silly John

Reputation: 1704

Error while connecting to Database Server from SQL Server Management Studio

Recently, while trying to connect to any SQL Server Database from SQL Server Management Studio, I am getting an error - Service 'Microsoft.SqlServer.Management.IRegistrationService' not found (Microsoft.SqlServer.Management.SDK.SqlStudio)

I tried updating to the latest version of SQL Server Management Studio but there is no change.

The full error stack is as below:

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

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)

Any idea why this error is happening?

Upvotes: 5

Views: 14610

Answers (4)

Uddin Waqar
Uddin Waqar

Reputation: 11

Go to C:\Users\ <\users>\Documents and create a new folder with name SQL Server Management Studio then Restart MSQL server as well.

Hopefully your issue resolved.

Upvotes: 1

Marek Malczewski
Marek Malczewski

Reputation: 694

What helped in my case... (version 17.9.1)

I have checked file:

C:\Users\<user>\AppData\Roaming\Microsoft\AppEnv\14.0\ActivityLog.xml

In there I have found the information that the directory:

C:\Users\<user>\Documents\SQL Server Management Studio

has not been found. I have created it manually and... SSMS started working.

Yeah I know... It sounds crazy.

Upvotes: 11

Dung
Dung

Reputation: 20565

@Marek Malczewski is right, thank you sir!

I too looked at the log files and fixed it the same way, here is a screenshot for your confirmation.

enter image description here

Upvotes: 1

Honza
Honza

Reputation: 11

Install .NET 4.8. I've had exactly the same issue and it worked for me.

Upvotes: 0

Related Questions