Cannot Create Database Diagram in SQL Server 2019 Database

Viewed 847

I have a SQL Server 2019 database that I restored from a SQL Server 2017 backup. It has diagrams present in the System Tables dbo.sysdiagrams table, but they are not visible. If I try to create a diagram I get an error:

enter image description here

What is the problem and how do I fix it?

Thank you,

2 Answers

A shot in the dark...likely a good one. Check the database owner to make sure it is set. It might have been a login that is not valid on this instance. Not having a owner can cause access issues in SSMS.

The suggestion from Randy led to a resolution. In looking at the DB files properties there was no owner.

enter image description here

I tried to set the owner to my Windows logon, but that led to an error because there was an existing reference to it. Then, I set the owner to sa and that worked.

enter image description here

The diagrams are now accessible.

enter image description here

The only remaining question concerns a possible conflict with the owner of some objects assigned to my Windows login and the files owned by sa.

Related