SQL Server:找出哪些用户对哪些表具有写权限?
在 SQL Server 7.0 中,我需要找出哪些用户对特定数据库中的哪些表具有写入权限。
我知道我可以在企业管理器中通过浏览数据库中的每个表并查看授予这些表的访问权限来完成此操作 - 但数据库中有几百个表。由于我只关心少数用户,因此我宁愿从用户角度来接近它。
是否可以在系统表上运行查询来实现此目的?是否有通过企业管理器的另一种方法?
我所追求的基本上是这样的:
UserOne has write access to Table1, Table2 and Table3
UserTwo has write access to Table2 and Table3
etc.
In SQL Server 7.0, I need to find out which users have write access to which tables in a particular database.
I know that I can do this in Enterprise Manager by going through each table in the database and looking at the access granted to those tables - but there are a few hundred tables in the database. As I'm only concerned with a handful of users, I'd rather be approaching it from the users.
Is there a query I can run on system tables to achieve this? Is there another approach via Enterprise Manager?
What I'm after is something that basically says:
UserOne has write access to Table1, Table2 and Table3
UserTwo has write access to Table2 and Table3
etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
神奇的 27 是由 1 (SELECT) + 2 (UPDATE) + 8 (INSERT) + 16 (DELETE) 构建而成,
感谢 Matt Lacey(和 Google!) 让我走上了正确的道路: http://blog.mrlacey.co.uk/2007/06/checking-数据库权限-in-sql.html
The magic 27 is built from 1 (SELECT) + 2 (UPDATE) + 8 (INSERT) + 16 (DELETE)
Thanks to Matt Lacey (and Google!) for setting me on the right course: http://blog.mrlacey.co.uk/2007/06/checking-database-permissions-in-sql.html