在SSMS中创建数据库图 - 验证失败

时间:2013-09-26 11:36:42

标签: sql-server-2008 ssms

我正在尝试从我拥有的现有SQLExpress数据库生成数据库图表但是我收到此错误:

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.

根据物业,我是业主: enter image description here

我确实试过这个,但语法不正确

ALTER AUTHORIZATION ON DATABASE::GuitaristDB TO PDC1\tcastonzo;

这已执行但可能不正确

ALTER AUTHORIZATION ON DATABASE::GuitaristDB TO tcastonzo;

2 个答案:

答案 0 :(得分:0)

您需要确保用户PDC1\tcastonzo(域或计算机帐户)登录到SQL Server。

用户tcastonzo看起来是一个SQL帐户,与PDC1\tcastonzo帐户分开。

您目前使用哪些凭据连接到SQL Server?

答案 1 :(得分:0)

尝试将数据库的所有者更改为 SA或NT AUTHORITY \ SYSTEM

  1. 右键单击要更改AUTHORIZATION的数据库,然后单击 的属性即可。将打开一个窗口/对话框。

  2. 在对话框的左侧,点击文件

  3. 从右侧将所有者更改为您自己的

  4. 然后使用更改的用户登录。它会解决你的问题。

    尝试并享受

    enter image description here

相关问题