From the course: SQL Server: Security for Developers
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Demo: Contained users - SQL Server Tutorial
From the course: SQL Server: Security for Developers
Demo: Contained users
- [Instructor] In this demo we're gonna show how to configure SQL Server for using contained database users. We're gonna walk through creating a database that takes advantage of this feature and we're also gonna create a database user and show you how to log in as one. The first thing we need to do with this feature is actually configure your SQL Server to make use of the feature. This isn't something that's turned on by default so I'm gonna use sp configure here. If you're using Management Studio, you right-click the server properties and choose Options but I like to do this via code just 'cause it's more consistent. So we've made that configuration and we'll go ahead and turn off Show Advanced Options. We're gonna start here on line 16 and we're gonna create a database called Demo Contained DB and the key thing here is on line 19 where we're specifying this option for the database, containment equals partial. That's the option that's gonna allow us to use contained users after we've…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Logins and users3m 39s
-
(Locked)
Azure AD and SQL authentication3m 42s
-
Demo: Create a user in SQL Server4m 36s
-
(Locked)
Roles and privileges overview3m 26s
-
(Locked)
Least privileges principal4m 20s
-
(Locked)
Building custom roles in SQL Server3m 44s
-
(Locked)
Demo: Building custom roles3m 2s
-
(Locked)
Predefined roles in SQL Server2m 57s
-
(Locked)
Roles in Azure SQL Database2m 45s
-
(Locked)
Contained users and their benefits3m 3s
-
(Locked)
Demo: Contained users2m 22s
-
-
-
-