Return to Snippet

Revision: 42088
at February 26, 2011 20:29 by darkbaron1912


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

Initial URL


Initial Description
TITLE: Microsoft SQL Server Management Studio Express
------------------------------

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.
 
Lỗi do user đang login không phải là owner của database nên không cho phép tạo diagram. Bạn chỉ cần chạy query sau để alter quyền owner cho database

Initial Title
sqltip AUTHORIZATION

Initial Tags


Initial Language
ActionScript 3