Forum Discussion
Namassivaya
Oct 27, 2021Copper Contributor
"Object reference not set to an instance of an object. (SqlManagerUI)"
I have installed SSMS 18.10 and I have connected to Azure SQL Managed Instance, then trying to edit SQL Agent Job always failing to open and resulting is this error "Object reference not set to an ...
- Feb 12, 2024adamoumagaji I do not have that issue with SSMS 19.3, which is the latest release. Can you please try with SSMS 19.3? Thanks.
Leonardo_Cursi
Jun 14, 2023Copper Contributor
Goodmorning, same problem on 19.1, tried on multiple Windows (10 & 11).
- Tessa_newNov 07, 2023Copper ContributorHi, I have this error message after adjusting some Securables on a Database Role and then trying to open Securables again. The same or others, makes no difference.
Using SSMS 19.1 via citrix published apps with RunAs.
I was able to open the Securables at first and added a table and stored procs but wasn't able to open it again to see if my changes were there. Got this error on every attempt, even on different DB connections or different roles.
After closing and restarting my SSMS I can see my result and adjust a role again. After clicking OK when done with my adjustments the window closes and after that the message appears again on every attempt.
Details:
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.PermissionsDatabasePrincipal.InitializePermissionsCore()
at Microsoft.SqlServer.Management.SqlMgmt.PermissionsDatabasePrincipal.OnInitialization()
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SetView(Int32 index, TreeNode node)
at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.OnBeforeSelection(Object sender, TreeViewCancelEventArgs e)- erinstellatoNov 07, 2023
Microsoft
Tessa_new Leonardo_Cursi We have these issues logged internally and will address them in the next release of SSMS. Thank you!
- Leonardo_CursiNov 08, 2023Copper Contributor
erinstellato oh cool, thanks Erin!
- erinstellatoJun 14, 2023
Microsoft
Hi Leonardo_Cursi - can you please provide the steps to recreate? I just tested with 19.1 against Managed Instance with the following steps:
1. I created a new SQL Agent job that had one step - it just runs a simple select statement (SELECT @@VERSION).
2. I saved the job, and then manually executed it to make sure it worked. (It did.)
3. I then right-clicked on the job and selected Properties.
4. In the properties window, I went to the Steps page, selected the job step, and then selected Edit.
5. I modified the script (added another query - select * from msdb.sys.databases) and then selected OK.
6. I selected OK again from the properties window, and then ran the job again.
I did not encounter any errors. If you are able to share your exact steps, that would be helpful to try and recreate the issue here. Thank you.- adamoumagajiFeb 12, 2024Copper Contributor
Hi, do have SSMS version 19.0 and i am running on Azure Managed Instance, when i do go on users to see Properties, i get the following error message.
TITLE: Microsoft SQL Server Management Studio
------------------------------Cannot show requested dialog.
------------------------------
ADDITIONAL INFORMATION:Cannot show requested dialog. (SqlMgmt)
------------------------------
Object reference not set to an instance of an object. (SqlManagerUI)
------------------------------
BUTTONS:OK
------------------------------- erinstellatoFeb 12, 2024
Microsoft
adamoumagaji I do not have that issue with SSMS 19.3, which is the latest release. Can you please try with SSMS 19.3? Thanks.
- Leonardo_CursiOct 03, 2023Copper ContributorI'm ashamed for the delay but I missed your response, Erin. Excuse me.
I followed the suggestions and the two executions were successful. I'm trying to connect to an old 2014 version even though I get, not always to be honest, the same error with sql 2017. In 2014 I get it in this particular error when I try to add a securable to a sql login (I choose the db, expand the security section, right click on the sql login). I'm sysadmin of that instance.
I report the error I get in the advanced information.:
===================================
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.PermissionsDatabasePrincipal.InitializePermissionsCore()
at Microsoft.SqlServer.Management.SqlMgmt.PermissionsDatabasePrincipal.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(XmlDocument doc, IServiceProvider provider)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolMenuItemHelper.OnCreateAndShowForm(IServiceProvider sp, XmlDocument doc)
at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()