Follow @RoyOsherove on Twitter

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 found the answer in this post via Larkware.  There are some other alternatives over here.
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:
  1. Right Click on your database, choose properties
  2. Goto the Options Page
  3. 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. "

 

Attack of the high and mighty forum reply (or: can't you just answer a simple question?)

More Interesting Podcasts about technology