生产机器的 SQL Server 2008 只读角色
我是一名程序员,暂时在我们公司承担 DBA 的职责。 我需要创建一个用户 ID(或角色),该用户 ID 对生产 SQL Server 2008 上的所有内容都具有只读访问权限。
该用户应该对该计算机上的所有数据库具有只读访问权限。 这包括能够查看数据、架构、脚本、存储过程、函数、表设计、链接服务器、SQL Server 代理作业、用户 ID、登录名等。
简而言之,一切
但是,它不应该能够修改或创建其中任何一个。
我已经成功实现了大部分目标,但无法获得对链接服务器、SQL Server 代理作业、用户 ID 和登录的只读访问权限。
是否有任何角色可以让我对所有内容进行只读访问?
I am a programmer temporarily tasked with the duties of a DBA at our firm.
I need to create a User Id(or a role) that will have read-only access to EVERYTHING on the production SQL Server 2008.
This user should have read-only access to all DBs on this machine.
That includes being able to view data, schema, scripts, stored procedures, functions, table design, linked servers, SQL Server Agent jobs, User IDs , Logins etc.
In short, EVERYTHING
However, it should NOT be able to MODIFY OR CREATE any of these.
I have managed to achieve most, but am unable to get read-only access to Linked servers, SQL Server Agent jobs, User IDs , Logins.
Is there any role(s) that will give me read-only access to EVERYTHING ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
接受的答案并不完全正确 - 添加该角色会授予修改权限,尽管有名称。这篇博客文章介绍了如何实际完成此任务,至少在工作方面:
http://benchmarkitconsulting.com/colin-stasiuk/2009/01/21/creating-a-real-sqlagentreaderrole/
The accepted answer is not quite correct - adding that role grants modify permissions, despite the name. This blog post covers how you can actually accomplish this task, at least with regards to jobs:
http://benchmarkitconsulting.com/colin-stasiuk/2009/01/21/creating-a-real-sqlagentreaderrole/
设法获得查看所有登录的能力。
授予查看任何定义到<只读用户-谁-看到-一切>
管理以获取查看 SQL Server 代理上所有作业的能力:
管理以获取查看链接服务器属性的能力。属性窗口仍然是空白的,但现在以下 SQL 语句可以解决问题。
Managed to get the ability to view all logins.
GRANT VIEW ANY DEFINITION TO <Read-Only-User-Who-Sees-Everything>
Managed to get the ability to view all jobs on SQL Server Agent:
Managed to get ability to view properties of Linked Server. Well the properties window is still blank, but the following SQL statements do the trick for now.