eastwater
eastwater

Reputation: 5588

Grant all permissions of a database to a user

SQL Server: how to grant all permissions of a database to a user?

The user can create, drop, delete, insert, select, reference any objects (table, view, sequence, stored procedures, etc) in any schema of the database.

grant create, drop, delete, insert, select, reference on MyDatabase.* to user1

Upvotes: 1

Views: 5179

Answers (1)

gotqn
gotqn

Reputation: 43636

You can use the following:

exec sp_addrolemember 'db_owner', 'user1';

When you are dealing with permissions you can refer the official documentation and download the poster sized chart of all Database Engine permissions in PDF format.

You can than search by role (for example db_onwer) and find what are the permissions that it has.

Upvotes: 3

Related Questions