SQL 2005 Database Diagrams Error: "database does not have a valid owner"

Ok, I've been bitten by this twice now, so here is the error and solution:

 

Error:

TITLE: Microsoft SQL Server Management Studio
------------------------------

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.

 

Solution:

In my case, it's because my domain login is set as the database owner but I am working remotely.  My PC can't validate my login against the domain, so SQL Server errors out with "invalid owner".

 

The easy solution is to change ownership of the database to sa, using sp_changedbowner.

Published Monday, September 08, 2008 1:32 PM by gstarbuck

Comments

# Josh’s Blog » Blog Archive » SQL 2005 Database Diagrams Error: "database does not have a valid owner" - Guy Starbuck@ Tuesday, January 20, 2009 11:00 AM

Pingback from  Josh’s Blog  » Blog Archive   » SQL 2005 Database Diagrams Error: "database does not have a valid owner" - Guy Starbuck

# re: SQL 2005 Database Diagrams Error: "database does not have a valid owner"@ Thursday, October 07, 2010 3:05 PM

The reason for this error is because the database backup was taken from different machine.To fix this issue, we need to add a valid user account as owner for this database... refer to this link for more details

www.a2zmenu.com/.../SQ-Database-Diagram-Issue.aspx

by Experts Comment

Leave a Comment

(required) 
(required) 
(optional)
(required)