SQL Server 2008 查看依赖关系的权限
我想使对数据库具有只读访问权限的 SQL Server 用户能够查看对象依赖关系。作为系统管理员,我可以在 SSMS 中选择一个表并查看任何依赖对象(视图、存储过程等)。我的只读用户只能看到很少或看不到这些依赖项。我已经授予了视图定义,但这并没有做到。
有谁知道是否有 SQL Server 权限?
谢谢。
I would like to enable a SQL server user with read-only access to a DB the ability to view object dependencies. As a sysadmin I can select a table in SSMS and view any dependent objects (views, SPROCs, etc). My read-only users can see very few or none of these dependencies. I have already granted view definition but that didn't do it.
Does anyone know if there is a SQL server permission for this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
授予相关对象的
查看对象定义
,或查看任何定义
。请注意,该权限不仅仅涵盖依赖项,还允许受让人查看对象的整个定义(存储过程的源、视图的原始查询、表定义)等等。如果您想要更细粒度的限制,则必须通过返回依赖项的存储过程对其进行自定义,并进行代码签名以获得适当的权限,但这样用户必须使用您的过程查看依赖关系(即 SSMS 和类似工具无法工作)。
VIEW OBJECT DEFINITION
granted on the relevant objects, orVIEW ANY DEFINITION
. Note that the permission covers more than just dependencies and allows the grantee to view the entire definition of the object (source of a stored procedure, original query of a view, table definition etc etc.If you want a more granular restriction you would have to customize it via a stored procedure that returns the dependencies and is code-signed to have the proper permissions, but this way users must use your procedure to view the dependencies (ie. the SSMS and alike tools won't work).