英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论