When generating the DB diagram in SQL server if we get the error "Database diagram support objects cannot be installed because this database does not have a valid owner" then we need to run the following command in SQL Server Management studio.
EXEC sp_dbcmptlevel 'YourdbName', '90';
go
ALTER AUTHORIZATION ON DATABASE:: YourdbName TO "domain\username"
go
use YourdbName
go
EXECUTE AS USER = N'dbo' REVERT
go
No comments:
Post a Comment