SQL Server Management Studio 显示数据库图表 (ER) 权限
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/849784/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SQL Server Management Studio Display Database Diagrams (ER) Permissions
提问by Jason Kanaris
I was wondering if anybody knew exactly what permissions where needed on a database in SQL Server 2005+ so that when a person uses SQL Server Management Studio, they could then be able to at minimum see the Database Diagrams.
我想知道是否有人确切知道 SQL Server 2005+ 中的数据库需要哪些权限,以便当一个人使用 SQL Server Management Studio 时,他们至少可以看到数据库图表。
I have tried giving the person db_datareader, db_datawriter, and db_ddladmin, but to no avail.
我曾尝试为该人提供 db_datareader、db_datawriter 和 db_ddladmin,但无济于事。
I have also tried giving them access in the Properties → Effective Permissions of the user. Under Effective Permissions, I could not find the database object type for "database diagrams" or anything like that to give the user access to.
我还尝试在用户的“属性”→“有效权限”中授予他们访问权限。在有效权限下,我找不到“数据库图表”或类似内容的数据库对象类型以授予用户访问权限。
They are running SQL Server Management Studio (non-express version.)
他们正在运行 SQL Server Management Studio(非快速版本。)
Any help would be great.
任何帮助都会很棒。
FYI, I did not want to give them db_owner access.
仅供参考,我不想给他们 db_owner 访问权限。
EDIT:
编辑:
- As to one of the comments: Yes, the database is an SQL Server 2005 database.
- As to one of the answers, moving the DB from production to development is not an option.
- 至于评论之一:是的,该数据库是 SQL Server 2005 数据库。
- 至于答案之一,将数据库从生产转移到开发不是一种选择。
回答by
Giving admin rights is not the right approach, you need to be Database Owner for Database Diagrams, check out this thread for more details.
授予管理员权限不是正确的方法,您需要成为数据库图表的数据库所有者,查看此线程以获取更多详细信息。
回答by Roman Boiko
First you need to set up Diagram Designer (you need to be db_owner for that). Just expand the Diagrams node, and press 'Yes' to enable diagramming.
首先,您需要设置图表设计器(为此您需要成为 db_owner)。只需展开图表节点,然后按“是”即可启用图表。
After that all other db users can create diagrams and see their owndiagrams. Only db_owner can see other's diagrams.
之后所有其他数据库用户都可以创建图表并查看他们自己的图表。只有 db_owner 可以看到其他人的图表。
Also the db_owner can change diagram owner to himself, but the original owner must be removed from database before doing that.
db_owner 也可以将图表所有者更改为他自己,但在此之前必须从数据库中删除原始所有者。