question

nidheesh.r.pillai avatar image
nidheesh.r.pillai asked

Registered Servers - Object reference not set to an instance of an object.

I am trying to add a SQL Server instance to the Registered Servers - Local Server Groups. Although Testing the server is successful, I get error when I save it. Below are the messages. How do I fix this? TITLE: Registered Servers ------------------------------ Object reference not set to an instance of an object. (Microsoft.SqlServer.Management.RegisteredServers) ------------------------------ Program Location: at Microsoft.SqlServer.Management.RegisteredServers.ServerGroup.get_ServerType() at Microsoft.SqlServer.Management.RegisteredServers.ServerGroup.set_Parent(ServerGroupParent value) at Microsoft.SqlServer.Management.RegisteredServers.ServerGroup..ctor(ServerGroup parent, String name) at Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersContextMenuManager.ContextNewGroup(Object sender, EventArgs e)
sql-server-2008-r2registered-servers
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

What do you get if you script the action? (From the wizard, click the script button, and show the resulting code). This may help to show if it's an inconsistency between the version of SSMS and your server. I have seen a similar issues before with 2008R2 RTM working with later server versions.
0 Likes 0 ·

1 Answer

nidheesh.r.pillai avatar image
nidheesh.r.pillai answered
Solved this by re-creating the user-profile for "UserName" on the machine. To do so, I logged off "UserName", logged in as "Administrator", removed the entire "UserName" folder on the C:\Users\ folder, and relogged-in as "UserName". A new folder for "UserName" was created and then upon opening SSMS, and trying to add a SQL Server instance to the Registered Servers - Local Server Groups. it is successfully done!
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pretty sure all you need to do is delete this folder and restart SSMS. That way you don't have to remove everything in the profile.

C:\Users\"username"\AppData\Roaming\Microsoft\SQL Server Management Studio

0 Likes 0 ·