From the course: SQL Server 2016: Administer a Database Infrastructure

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create and maintain custom roles

Create and maintain custom roles - SQL Server Tutorial

From the course: SQL Server 2016: Administer a Database Infrastructure

Start my 1-month free trial

Create and maintain custom roles

- [Instructor] SQL Server includes many built-in Server and Database level Roles that users can be assigned to but sometimes they're not specific enough for your particular needs. Instead of assigning permissions to users, directly, consider building Custom Roles instead, that way groups of users with similar requirements can be assigned to a single Role which makes management of their permissions much easier. Let's take a look with the WideWorldImporters Database and I'll create a couple of new data Tables. The first will be the Warehouse Schema and there'll be a Table called NewProducts. The second will be, again, with the Warehouse schema and a Table called NewVendor. Next, we need a user so we'll go ahead and create a new user called WarehouseManager and he will not have a login. And finally, we need to create our Role. The Role I want to create is going to be called ProductEntry and we create it just with a simple line CREATE ROLE and the name of the Role. Now that we have a Role…

Contents