Rob Gonda's Blog

Database diagram support objects cannot be installed

If you ever get a message like this when trying to create a diagram in SQL 2005

"Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."

Here's step by step what you have to do:

EXEC sp_dbcmptlevel 'yourDB', '90';
use [yourDB]

I was pretty frustrated when my diagram was not present when I restord a database of mine in MS SQL Server 2008 Express. The error shown was...
Tracked by The Crazy World of Branev | Tracked on 10/28/09 5:10 PM

Trackback URL for this entry:

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
The first solution works great, thanks
# Posted By Alvaro Araya | 7/3/08 4:11 PM
Thanks. It works.
# Posted By Ben | 10/28/08 1:21 PM
Thanks for the excellent tip!
# Posted By marco | 11/7/08 4:10 AM
I'm having same problem with SQL Server 2008 Express edition. When I tried to execute this statements, I got "Could not obtain information about Windows NT group/user 'HOME\Administrator', error code 0x5". This is the account which I installed the SQL server 2008 Express. According to the Management Studio, this account owns the database as the DBO. Does this work with the SQL 2008 too?
# Posted By Ibrahim | 11/30/08 4:41 PM
Just wanted to share .... Thanks for the post .. it almost worked for me. I was trying to set the owner to an active directory account (via your code .. also tried via mgmt studio) and it wouldn't take. I eventaully tried setting the owner 'sa' and it finally worked (that and having compat level=90)
# Posted By Chad | 2/18/09 11:27 AM
It works!!! Thank you... you are the best!!!
# Posted By Juan | 5/26/09 6:29 PM
Thanks, worked a treat.
# Posted By Paul H | 6/10/09 6:30 AM
Here is the solution:
1. Right-click on database , and chose properties

2. Go to File page

3. Enter "sa" (" sa" is a default database user name or Use the user-name that you type during database installation)

4. Then click ok

Hope this help
# Posted By kelly | 7/19/09 6:50 AM
It worked in SQL 2008
# Posted By Fahd | 8/12/09 12:43 PM
worked like a charm
# Posted By Ohad | 9/8/09 8:28 AM
works perfectly, thanks
# Posted By Tanjona | 10/1/09 10:53 AM
Thanks alot
It's working nicely
# Posted By Mimo | 10/26/09 3:47 AM
Thank you very much!! Works beautifully!
# Posted By chris | 11/13/09 4:15 AM
Thanks. Worked great!
# Posted By Laurie | 4/19/10 3:36 PM
This blog is running version 5.9.003. Contact Blog Owner