db_owner 与 db_datareader / db_datawriter 有什么区别?

发布于 2025-01-02 11:33:35 字数 270 浏览 2 评论 0原文

我开发了一个业务应用程序,同时我学会了使用 SQL Server 做一些重要的事情。我为数据输入人员 db_owner 和查看者 db_datareader 提供支持。

现在我正在尝试强化事情,我认为合乎逻辑的事情是给予 db_datareader 和 db_datawriter 而不是 db_owner,但我很好奇(a)这是正确的做法吗? (b) 哪些事情是 db_owner 可以做而 data_writer 不能做的? (即我切换后什么都不起作用)。

I developed a business application at essentially the same time I learned to do non-trivial anything with SQL Server. I give data entry people db_owner and viewers db_datareader.

Now I'm trying to harden things up and the logical thing to my mind is give db_datareader and db_datawriter instread of db_owner, but I'm curious about (a) is this the right thing to do? and (b) what kinds of things can db_owner do that data_writer can't? (i.e. will anything not work after I switch).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无语# 2025-01-09 11:33:35

db_owner 固定数据库角色的成员可以对数据库执行所有配置和维护活动。 db_datawriter 可以执行 DELETE、INSERT、UPDATE,而 db_datareader 只能执行 SELECT 操作。

您应该始终尝试仅授予完成任务所需的最低级别的权限。大多数用户不需要访问配置或管理功能。对于数据输入用户,db_datawriter 可能比较合适。

Members of the db_owner fixed database role can perform all configuration and maintenance activities on the database. db_datawriter can perform DELETE, INSERT, UPDATE while db_datareader can only perform SELECT operations.

You should always try to grant only the minimum level of permissions needed to accomplish tasks. Most users don't need access to configuration or management features. In the case of data entry users, db_datawriter is probably appropriate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文