I was trying to use Database diagrams is SQL Server and got 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 to use this command to solve my problem
ALTER AUTHORIZATION ON DATABASE::mydb TO "domain\username" GO
but it did not help. When I changed my domain account to
sa and ran
ALTER AUTHORIZATION ON DATABASE::mydb TO sa GO
I got rid of this error. The question is, why domain account is not acceptable for database owner (it seems that only
NT AUTHORITY\SYSTEM are acceptable)?