Uri Abramson
Uri Abramson

Reputation: 6175

Does db-owner has the permission to create users?

How can I create a user which has the permission to create users in SQL Server?

I created a user with db-owner role but when I try to create new users it says that I don't have sufficient permissions.

Upvotes: 1

Views: 5104

Answers (1)

Andomar
Andomar

Reputation: 238296

There are two types of principals in SQL Server:

  • A server-wide login. A login is required to connect to the database server. It stores the users credentials. Rights on server privileges, and membership in server roles, are assigned to a login.
  • A database-specific user. One user is always linked to one login. A user is required to switch to a database with use [dbname]. Rights on stored procedures, views, and membership of database roles are assigned to a user.

Creating a user requires alter any user permission, or membership of the db_accessadmin or db_owner database roles. A database owner is a member of the db_owner role by definition.

Creating a login requires the alter any login privilege. By default, that's granted to logins in the the sysadmin or securityadmin server role.

Upvotes: 2

Related Questions