0

I am using SQL Server 2017 and the latest SSMS version. When I click securables of login in SSMS, I see this error:

Object reference not set to an instance of an object. (SqlMgmt)


Program Location:

at Microsoft.SqlServer.Management.SqlMgmt.PermissionsData.Securable.GetImage(SecurableType type)
at Microsoft.SqlServer.Management.SqlMgmt.PermissionsSecurableSelector.InitializeBitmaps() at Microsoft.SqlServer.Management.SqlMgmt.PermissionsSecurableSelector..ctor(IHelpProvider helpProvider, IServiceProvider serviceProvider, Principal principal, PermissionsDetailsGrid permissionsGrid, Object connectionInfo, Boolean yukonOrGreater)
at Microsoft.SqlServer.Management.SqlMgmt.PermissionsOfPrincipalsCore.InitializeSecurableSelector()
at Microsoft.SqlServer.Management.SqlMgmt.PermissionsOfPrincipalsCore..ctor(IHelpProvider helpProvider, IServiceProvider serviceProvider, Principal principal, Object connectionInfo, Boolean yukonOrGreater, Boolean showColumnPermissionsInDetailsGrid)
at Microsoft.SqlServer.Management.SqlMgmt.PermissionsServerPrincipal.InitializePermissionsCore()
at Microsoft.SqlServer.Management.SqlMgmt.PermissionsServerPrincipal.OnInitialization()
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SetView(Int32 index, TreeNode node)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.OnBeforeSelection(Object sender, TreeViewCancelEventArgs e)

What can be the problem? I first thought it might be permission problem, but even if I use sysadmin login, I see this error every time.

6
  • 1
    Are you using the latest SSMS version (currently 19.1?
    – Dan Guzman
    Commented Sep 8, 2023 at 14:19
  • @DanGuzman Yes. Commented Sep 11, 2023 at 5:01
  • Microsoft.SqlServer.Management.SqlMgmt.PermissionsData.Securable.GetImage Looks like your install is corrupt or something. Commented Sep 11, 2023 at 10:07
  • @SeanGallardy how did you know that? Commented Sep 11, 2023 at 10:45
  • I restarted SSMS a few times and it works for now. But I still want to know what was the problem. Commented Sep 11, 2023 at 11:54

1 Answer 1

0

I get this error when trying to use SSMS 19.1 (aligned with SQL Server 2019) to connect to SQL Server 2016. When I use SSMS 13.0 (aligned with SQL 2016) it works fine.

When you posted this in Sept 2023, the latest version of SSMS was 20.1, which is aligned with SQL Server 2022. Since you're using it with SQL Server 2017, I suspect you're dealing with a similar problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.