Tim Huffam

Dotting the I and crossing the T of I.T.

  Home  |   Contact  |   Syndication    |   Login
  153 Posts | 0 Stories | 2747 Comments | 653 Trackbacks

News

Archives

Post Categories

Interesting Blogs/Links

When trying to add a diagram to an SQL Server 2005 db I got the following error:

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.

I tried the suggestion mentioned in the message but that didnt work.  Also found that SQL Server Management Studio does not like you trying to change various permissions - it only works certain ways (go figure).

Anyway, eventually found this post with the solution (thanks very much to cutiepie) being:

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)"

 

posted on Wednesday, July 5, 2006 7:36 PM

Feedback

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 7/6/2006 10:50 AM Ram Shankar Yadav
Great job done, I was having the same problem
Thanks a lot !

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 7/7/2006 11:50 AM MonsoonDawn
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.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 7/8/2006 1:40 AM Harry Chou
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.

# 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." 7/11/2006 2:29 PM Community Blogs
I found the answer in this post via Larkware. There are some other alternatives over here. I came accross

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 8/2/2006 8:05 PM agrath
awesome, wondered why on earth i couldnt change the database owner (as the error suggests)
didn't even think to check the compatibilty level since i upgraded from a 2000db.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 8/3/2006 8:18 AM Yee Chee Leong
Thank you for saving newbies to SQL Server 2005 like me. Appreciate your help a lot. Happy programming!

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 8/16/2006 9:29 AM Julius
God Bless

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 8/16/2006 9:39 AM Julius
I tried the above mentioned solution but still was not working and displaying the same error message - if you got the same error as me then just try the follwing lines in SQL Query:

EXEC sp_dbcmptlevel 'dbname', '90';

ALTER AUTHORIZATION ON DATABASE::dbname TO valid_login

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 9/4/2006 10:33 AM DrHOffman
Thank you a milion x a milion

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 10/10/2006 9:30 AM tups
I got the same message today. I've also tried all the suggested solutions with no luck. In fact the exact same database works on my local machine, but as soon as i script it out and deploy it it complains... even with the same db owner. Very confusing

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 10/23/2006 9:19 PM Carmy
Thanks a lot. Saved me heaps of time

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 11/2/2006 8:07 AM Simone
it's correct to set the compatibility level to 90 (slq2005) but you'll also ned to set a valid db owner, right click on the database, file tab and set SA as db owner (or a valid mssql user)

bye!

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 1/14/2007 6:52 PM horseperson
Thanks so much!!!

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 1/22/2007 8:42 AM Mirko
Thanks Julius,
Your solution works for me.



# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 1/27/2007 4:18 PM Dana
Thanks for posting this, worked for me.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 2/1/2007 8:11 AM Sean vd Walt
Thank you so much to everyone!! This solved a very annoying problem. A huge middle finger to Microsoft!!

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 3/2/2007 11:26 PM Grahame C
Both ways did not work the second way gave me an error when running the query. The first way gave me the same error when I switched the Compatability to 2005.


Msg 15151, Level 16, State 1, Line 1
Cannot find the principal 'valid_login', because it does not exist or you do not have permission.


# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does not have a valid owner. 3/2/2007 11:32 PM Grahame C
Strike that, ... I missed the post about adding the 'sa' as a owner in the file tab under the database. Once I did that it worked with out error. Sorry about the extra posts.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 7/19/2007 8:15 AM Shyam
Thanks this article that came up as #1 solution on Google.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 11/22/2007 1:10 PM Robert Green
Thanks so much! I simply had to execute the following:

EXEC sp_dbcmptlevel 'dbname', '90';

ALTER AUTHORIZATION ON DATABASE::dbname TO valid_login

where 'dbname' = My Database Name
and
valid_login = sa (or any other user name you have specified)

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 12/3/2007 11:30 PM Chris
Hey,

I tried all the other solutions on the web and they didnt work, but yours fixed it!

Thanks a million. :)

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 1/21/2008 5:06 AM chetan
God bless you , Well-written article.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 2/11/2008 8:52 AM surekha praveen
Thanks a lot

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 3/13/2008 7:58 AM vavavivi
Thank you. I have fixed my probleme

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 3/13/2008 11:00 PM Sangram
Thank u so much...
by this great post, i am able to fix my problem.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 4/10/2008 9:48 PM Ashok kumar
I tried the solution which author has given. But that didn't worked.
I did the following, and now it is working well. Thanks lot. ;)

EXEC sp_dbcmptlevel 'dbname', '90';
ALTER AUTHORIZATION ON DATABASE::dbname TO sa

I'm authenticated using windows login. Even then also "sa" worked well for me.

Thanks once again.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 5/7/2008 11:54 PM Rizwan
Thanks a lot i was thinking of installing SQL Server again. Now my problem is solved

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 5/14/2008 11:16 PM Rəşad
THANK YOU. This problem was annoying me more than a month. I solved it right after read your solution.

GREAT!!!!
I AM VERY GRATEFUL TO YOU.


# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 5/16/2008 3:26 PM baljeet singh
thanx a lot....

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 6/21/2008 11:47 AM darklord
thanks dude,

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 8/20/2008 10:30 PM dude
thanks alot, it saved my time to seek further

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 12/6/2008 11:37 AM SMC
Thanks -- very helpful.

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 1/1/2009 8:03 PM Shajeeb S
EXEC sp_dbcmptlevel 'dbname', '90';
ALTER AUTHORIZATION ON DATABASE::dbname TO sa

Hurray it's working. Thanks whoever posted this query........................

# re: Cannot add diagram to SQL Server 2005 DB: Database diagram support objects cannot be installed because this database does no 7/17/2009 8:33 AM Philippe B
This :

EXEC sp_dbcmptlevel 'dbname', '90';
ALTER AUTHORIZATION ON DATABASE::dbname TO sa

Worked great!

Thanks!

Phil

# Man 9/26/2009 2:42 AM Irfan Ahmad (Isfan)
Thank you man. i was need of this thing.

EXEC sp_dbcmptlevel 'dbname', '90';
ALTER AUTHORIZATION ON DATABASE::dbname TO sa

Thanks once again.

Post A Comment
Title:
Name:
Email:
Comment:
Verification: