Posted By

darkbaron1912 on 02/26/11


Tagged

sqltip


Versions (?)

sqltip AUTHORIZATION


 / Published in: ActionScript 3
 

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

  1. EXEC sp_dbcmptlevel 'yourDB', '90'
  2. go
  3. ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
  4. go
  5. use [yourDB]
  6. go
  7. EXECUTE AS USER = N'dbo' REVERT
  8. go

Report this snippet  

You need to login to post a comment.