在 SQL Server 2005 中更改数据库图表的所有者

编程入门 行业动态 更新时间:2024-10-23 17:26:55
本文介绍了在 SQL Server 2005 中更改数据库图表的所有者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要更改 SQL Server 2005 中数据库图表的所有者.目前它归我所有 (domain\username.diagramName),我想将其更改为 dbo (dbo.diagramName) 所有.我以为我可以使用 sp_changeobjectowner,但我相信这仅适用于表、存储过程等......我认为这很容易,我只是无法通过谷歌搜索找到任何东西.

I need to change the owner of a database diagram in SQL Server 2005. Currently it is owned by me (domain\username.diagramName) and I would like to change it to be owned by dbo (dbo.diagramName). I thought I could use sp_changeobjectowner, but I believe that is only for tables, stored procedures, etc... I think this is pretty easy, I just haven't been able to find anything through a google search.

推荐答案

最后,我不得不删除该用户架构,然后运行以下更新...

In the end, I had to remove that users schema then run the following update...

-- to identify the diagram id, name, & owner select * from dbo.sysdiagrams -- to manually change the owner of a diagram -- note: i derived that the principal_id =1 for dbo from above query update dbo.sysdiagrams set principal_id =1 where diagram_id = 1

我最终从校园里的 DBA 那里得到了我需要的帮助.

I ended up getting the help I needed from a DBA here on campus.

更多推荐

在 SQL Server 2005 中更改数据库图表的所有者

本文发布于:2023-10-16 05:34:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1496647.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:所有者   图表   数据库   SQL   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!