Recent database backup restore come-up with new error while tried to create database diagram
“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.”
After doing googling I found solution and it is really simple. I got 2 ways for that
1. Right click on datbase and go to properties .. than click on file .. set owner to appropriate user .. in my case its SA
click OK and Done !
and the another way is using Query
ALTER AUTHORIZATION ON DATABASE::<DATABASE NAME> TO <VALID USERNAME>
Now you can create database diagram !
Happy coding !