Database Diagram Support Objects cannot be Installed … no valid owner

后端 未结 14 1343
醉酒成梦
醉酒成梦 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 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

提交回复
热议问题