希望 永远是快乐的.

有一种沉默叫霸气,有一种内敛叫个性,有一种简单叫深遂,有一种不屑叫自我。

导航

The Database Diagrams solution for SQL Server 2008

Today, i want to create a database diagram for my a database. it throws an error "Database diagram support objects cannot be installed because this database does not have a valid owner..." when i was clicking on New database diagram menu. My SQL Server is 2008 express.

Luckily, i excuted the following script, and then the problem are fixed. 

 

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

 

 

 

posted on 2012-06-10 22:20  希望(Jack)  阅读(168)  评论(0编辑  收藏  举报