I have 2 existing database diagram in local server in SQL Server 2018, SSMS 18.1 While opening it, the application becomes "Not Responding" then crashes without any error. It was working fine for the last 7 days.
I have been dealing with the same issue on SSMS 18.5.
I do not know what causes the [dbo].[sysdiagrams] table to become corrupted but I have found that if I copy the diagrams from an older (working) version of the database, they are editable again.
The TSQL I used to solve the problem:
DELETE FROM [corrupt_database].[dbo].[sysdiagrams];
INSERT INTO [corrupt_database].[dbo].[sysdiagrams]
SELECT [name],
[principal_id],
[version],
[definition]
FROM [valid_database].[dbo].[sysdiagrams];
From my initial testing, the diagrams will save and reopen again; even after restarting SSMS.
By mean 18, if you have SSMS version 18.0 installed then Database Diagrams were deprecated and removed from 18.0 version, and added back into SSMS version 18.1.
Source: Deprecated and removed features in 18.0:
check out Deprecated and removed features in 18.0 in above Release notes for SQL Server Management Studio (SSMS).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With