Saturday, July 20, 2013

SQL Server Solve Error: Database diagram support objects cannot be installed because this database does not have a valid owner

Hello friend, In this post i would like share solution of one small problem, which occurs many times in SQL Server.

When we restore Database to any other server and try to create database diagram then it does not allow to create database diagram and its give error

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

Solution is very small. just execute below query:

Replace MYDB with your DB name then execute the query

ALTER AUTHORIZATION ON DATABASE::MYDB TO sa

After executing above query we can create DB diagram