我无法访问 SQL Server 数据库图表功能。我收到一个错误:
db_owner 的成员必须使用数据库图表功能
当我联系我的服务提供商时,他们说他们没有授予我这个db_owner
角色,我需要升级到 VPS-server。我尝试使用脚本找到我的许可,并得到以下信息:https ://prnt.sc/m1swe9
这个问题有什么解决方法吗,我可以申请一个特权较低的角色吗?
我无法访问 SQL Server 数据库图表功能。我收到一个错误:
db_owner 的成员必须使用数据库图表功能
当我联系我的服务提供商时,他们说他们没有授予我这个db_owner
角色,我需要升级到 VPS-server。我尝试使用脚本找到我的许可,并得到以下信息:https ://prnt.sc/m1swe9
这个问题有什么解决方法吗,我可以申请一个特权较低的角色吗?
要使用数据库图表设计器,它必须首先由 db_owner 角色(SQL Server 数据库的角色)的成员进行设置,以控制对图表的访问。
关于图表所有权需要牢记的几点:
• Although any user with access to a database can create a diagram, once the diagram has been created, the only users who can see it are the diagram's creator and any member of the db_owner role.
• Ownership of diagrams can only be transferred to members of the db_owner role. This is only possible if the previous owner of the diagram has been removed from the database.
• If the owner of a diagram has been removed from the database, the diagram will remain in the database until a member of the db_owner role attempts to open it. At that point the db_owner member can choose to take over ownership of the diagram.
请参考类似的帖子,Aaron 给出了两种解决方法:
1. In a Logon trigger, update the principal_id of all diagrams to be the current login. This means they will have access to all diagrams until the next person logs in.
2. Use a trigger on the sysdiagrams table itself, and whenever a diagram is created or updated, add / update a copy for each principal (with their user name appended).
话题链接:https ://dba.stackexchange.com/questions/43946/permission-required-to-view-a-database-diagram