Wednesday 2 August 2017

Database diagram support objects cannot be installed -Fixed




I was creating database diagram during one KT , and faced this issue in dev environment.
As soon as I tried to open the database diagram I faced following error. It was known for me so resolved it quickly, but better to do documented it for future reference.

Error

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.


Workaround / Fix / Solution Execute below scripts on database

  1. ALTER AUTHORIZATION ON DATABASE::<database name>TO sa
  2. Select your database -->Right Click -->Select Properties
  3. Select FILE in left side of box
  4. In the OWNER box, select user ‘sa’ or NT AUTHORITY\SYSTEM
  5. Click OK.



This should solve your problem.

No comments:

Post a Comment

Azure AzCopy Command in Action

Azure AzCopy Command  in Action -  Install - Module - Name Az - Scope CurrentUser - Repository PSGallery - Force # This simple PowerShell ...