Tuesday, June 8, 2010

Database diagram support objects cannot be installed

Most of time we came accross below given error when we try to create database design diagram in sql server 2008, this is because proper authriztion is not given to the sql server user the solution for this is easy now

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

EXEC sp_dbcmptlevel 'eQualBiz', '90';
go
ALTER AUTHORIZATION ON DATABASE::[eQualBiz] TO "sa"
go
use [eQualBiz]
go
EXECUTE AS USER = N'dbo' REVERT
go