Reputation: 5588
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
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