Solution to: "Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner."
I came accross this problem a couple of times but never had the chance to delve too much into it.
Next time I'll know what to do - and so will you.
"
In SQL Server Management Studio do the following:
- Right Click on your database, choose properties
- Goto the Options Page
- In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)"
And some other comments on that post add:
"
Actually, once you set the compatibility level to SQL 2005, you should install the diagram components
(by click on the diagram node) and then set the compatibility back to your default.
This way you won't run the risk of having some of your old scripts generate errors. I paid my price to learn this trick."
"
Your solution only works in cases where compatibility level is set to something other than the default.
There are in fact a variety of cases where this error message is the result.
That's why it's so insanely annoying and misleading.
The most common case is still that the user creating the database does not have a specific login account
but rather is part of a group with login rights. "