From the course: SQL Server: Security for Developers

Unlock the full course today

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

Building custom roles in SQL Server

Building custom roles in SQL Server - SQL Server Tutorial

From the course: SQL Server: Security for Developers

Start my 1-month free trial

Building custom roles in SQL Server

- [Instructor] So one of the ways to really hone in on your permissions in SQL Server is to focus on custom roles, especially when you're developing a new application, SQL Server offers a bunch of fixed roles both at the server and the database level. And I kinda like to shy away from those, especially when I'm doing application development. So things like db_owner which gives complete and total control over a complete database to the point where a user can grant permissions to that database to other users. Not a good role. Or even db_datareader which is another system defined role. That allows reading on any table within a data. Typically I'd like to see my permissions way more granular than that, especially for an application. I don't want a user to be able to access everything, unless I want them to, and then I can grant them that role. Here we're gonna talk about how to build your own custom roles in SQL Server. As you plan your data security strategy, your best practice is gonna…

Contents