Monday, February 23, 2009

Error trying to create a Database Diagram in Sql Server 2005

Today I tried to create a Database Diagram in SQL Server 2005 and received a pop up error message:

Sql 2005 Database diagram support objects cannot be installed because this database does not have a valid owner

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

Thank you Shahed for posting the solution on
http://geekswithblogs.net/shahed/archive/2007/11/19/116940.aspx

No comments:

Post a Comment