Database Diagram Support Objects cannot be Installed … no valid owner

后端 未结 14 1222
醉酒成梦
醉酒成梦 2021-01-29 18:22

I tried to create a database diagramm with SQL Server 2008, but an error occurs:

Database diagram support objects cannot be installed because this dat

相关标签:
14条回答
  • 2021-01-29 18:51

    I had the same problem.
    I wanted to view my diagram, which I created the same day at work, at home. But I couldn't because of this message.
    I found out that the owner of the database was the user of my computer -as expected. but since the computer is in the company's domain, and I am not connected to the company's network, the database couldn't resolve the owner.

    So what I did is change the owner to a local user and it worked!!
    Hope this helps someone.

    You change the user by right-click on the database, properties, files, owner

    0 讨论(0)
  • 2021-01-29 18:54

    Only need to execute it in query editor ALTER AUTHORIZATION ON DATABASE::YourDatabase TO [domain\account];

    0 讨论(0)
  • 2021-01-29 18:56
    USE [ECMIS]
    GO
    EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false
    GO
    

    It works.

    0 讨论(0)
  • 2021-01-29 18:59

    This fixed it for me. It sets the owner found under the 'files' section of the database properties window, and is as scripted by management studio.

    USE [your_db_name]
    GO
    EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false
    GO
    

    According to the sp_changedbowner documentation this is deprecated now.

    Based on Israel's answer. Aaron's answer is the non-deprecated variation of this.

    0 讨论(0)
  • 2021-01-29 19:00

    you must enter as administrator right click to microsofft sql server management studio and run as admin

    0 讨论(0)
  • 2021-01-29 19:00

    The real problem is that the default owner(dbo) doesn't have a login mapped to it at all.As I tried to map the sa login to the database owner I received another error stating "User,group, or role 'dbo' already exists...".However if you try this code it will actually works :

    EXEC sp_dbcmptlevel 'yourDB', '90';

    go

    ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"

    go

    use [yourDB]

    go

    EXECUTE AS USER = N'dbo' REVERT

    go

    0 讨论(0)
提交回复
热议问题