Hi i just set up a new pc after my touch pad went bad. our tech guy installed a version of ssms that says its this SQL Server Management Studio 21.4.12+5.36408.4. its not the version i used before. I'm not 100% certain what image he uses to set up a new pc.
I'm getting the error you see below when trying to script multiple table creates from object explorer details. I'm poking around for a reason as we speak. The error details are long but i show the beginning of the exception stack too. It may be important to know that as i was installing visual studio and a couple of add ins , i noticed maybe some newer version of .net were getting installed, not sure though.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.PropertyAccessHandler.Visible(INodeInformation source)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.DefaultMenuHandler.GetMenuItems(ArrayList items)
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerView.ShowContextMenu(IExplorerViewItemSet selectedItems, Control control, Point point)
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ExplorerListView.ShowContextMenu(Point location)
at Microsoft.SqlServer.Management.SqlStudio.Explorer.ExplorerListView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
As a guess - did the person who installed SSMS install it using an admin account on the machine and install all of the components as "all user" not "current user"?
My other thought is something was installed after SSMS (such as Visual Studio) that caused some conflict in a shared dependency.
Another thought - potentially a bug in SSMS 21 OR compatibility issue. Are you connecting to a recent (ie supported) SQL Server version? If it is unsupported, it could be that SSMS has a bug.
If you are an admin, I'd start with a repair install. If you are not an admin, I'd request IT to do a repair install OR install a previous version. Looking at my system, 21.4.12 appears to be the latest version, so may need to wait for an update.
Now, that being said, the error makes MAY be accurate and if so, it sound like a table listed on the database is unable to be scripted out. Can you script out ANY tables? If it works for some but fails for others, I would be doing a backup and a checkdb on the database to make sure it isn't some form of corruption and not a bug in SSMS. If it comes back clean, then I'd try scripting out tables and find ones that fail. On any that fail, run the stored procedure sp_help to get a list of all the stuff you'd need to re-create the table and script it manually. I kind of suspect that the problem is either a busted install OR busted table metadata though.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
August 25, 2025 at 7:41 pm
I have SQL Server Management Studio 21.0.0+167.36109.1
I know there were some bugs early on in the SSMS v21 release. Some things were fixed quickly. I'd update to the latest, as it appears to be very stable for query windows and OE stuff. Or at least as stable as 20.4, which is the other version I have
August 27, 2025 at 2:17 pm
thx Brian and Steve...
August 27, 2025 at 2:23 pm
i am currently on 21.4.12+5.36408.4.
But am noticing there is an smo version too which sounds more like what is involved in my issue, its 17.100.73 .0+some really long string of hex characters that i dont think is even a guid.
August 27, 2025 at 2:39 pm
smo 17.100 is the latest so i'll now try a reinstall. hope it doesnt break vs and put me in a wild goose chase.
August 27, 2025 at 5:48 pm
so...which if any of these is ssms? This seems somewhat confusing. am i installing all 4? how about for core functionality? in the old days i think we installed only one thing with different options. im choosing just the ai copilot. leaving the other 3 unchecked. assuming because it also says ssms core to the right i'll juts get ssms and its preview copilot ai feature.
August 27, 2025 at 5:58 pm
i uninstalled ssms and reinstalled with copilot preview and all is well. thank you.
Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply