Roles and/or Permissions would I need to Assign to Users.

huangapple go评论92阅读模式
英文:

What Roles and/or Permissions would I need to Assign to Users

问题

我想让某些Sql Server数据库的用户能够:

  • 创建登录
  • 在数据库中创建用户
  • 在该数据库中的某些表上分配插入、更新、选择和删除权限

我需要为他们分配哪些角色或权限才能实现这一点?

我已经搜索了许多提供模糊解释但没有直接答案的在线文章。

英文:

I would like to have certain users of an Sql Server database to be able to:

  • Create Logins
  • Create Users in databases
  • Assign insert, update, select and delete permissions on certain tables within that database

What roles or permissions do I need to assign to them to accomplish this?

I've searched many online articles that offered vague explanations but found no direct answers.

答案1

得分: 1

创建登录:
用户需要加入LoginManager组以创建/修改登录。此外,他们需要具有ALTER ANY LOGIN权限:

GRANT ALTER ANY LOGIN TO user1

在数据库中创建用户:
用户需要具有ALTER ANY USER权限以创建用户。

GRANT ALTER ANY USER TO user1

分配数据库中某些表的插入、更新、选择和删除权限:
用户需要在特定对象上具有*SELECT / INSERT / UPDATE / DELETE*权限。

GRANT SELECT ON dbo.Tabela TO users1
GRANT INSERT ON dbo.Tabela TO users1
GRANT UPDATE ON dbo.Tabela TO users1
GRANT DELETE ON dbo.Tabela TO users1
英文:

Create Logins:
User needs to be part of the LoginManager Group to Create / Alter a Login. Also, they need to have ALTER ANY LOGIN Permission:

GRANT ALTER ANY LOGIN TO user1

Create Users in databases
User needs to have ALTER ANY USER permission to create user.

GRANT ALTER ANY USER TO user1

Assign insert, update, select and delete permissions on certain tables within that database
User needs to have SELECT / INSERT / UPDATE / DELETE Permission on specific object.

GRANT SELECT ON dbo.Tabela TO users1
GRANT INSERT ON dbo.Tabela TO users1
GRANT UPDATE ON dbo.Tabela TO users1
GRANT DELETE ON dbo.Tabela TO users1

huangapple
  • 本文由 发表于 2023年4月11日 00:18:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/75978783.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定