From the course: Designing Database Solutions for SQL Server 2016

Unlock the full course today

Join today to access over 23,300 courses taught by industry experts.

Use schemas to enhance database security

Use schemas to enhance database security - SQL Server Tutorial

From the course: Designing Database Solutions for SQL Server 2016

Use schemas to enhance database security

- [Instructor] Schemas in SQL Server 2016 allow you to easily assign security permissions to users and roles by creating a collection of objects, and granting permissions to the collection, rather than to the individual object by establishing a Schema-based security strategy, permissions are granted to objects at the moment that they're created, and not as a separate step, which must be completed afterwards, and let's face it, this is a process that was just waiting to be forgotten, overlooked, or simply misconfigured. So let's run through a quick example of creating a Schema-based security policy on a new database that I'm going to call SchemaSecurityDB. Let's go ahead and create that database and then switch into it. Now the first thing I need is a Schema on the database. We can use the Create Schema syntax, and the name of the Schema will just be HumanResources, and we'll create it with the authorization of the DBO account that I'm signed into right now. Let's go ahead and execute…

Contents