From the course: Microsoft SQL Server 2016 Essential Training

Unlock the full course today

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

Database-level users

Database-level users

- [Instructor] In this section, we'll look at creating a user inside of an individual database. So I'll open up the list of Databases, open up DemoDB02, and at the bottom, I'll open up Security. One of the options we see in Security is Users. I'll right click on that and go to New User. I'll need to give the user a name, and I'm going to go with TestUser. This will have to map to a previously created login, so I'm going to use TestLogin that we created previously. And optionally, I can provide a default schema. On the left-hand side, we can select the page for Owned Schemas, and the majority of our users are not going to own schemas, but they will be a member of a schema, and we have a page for that also called Membership. So I'm going to put this user into the datareader schema and the denydatawriter schema. So this particular user will be able to read data but will not be able to write data. The next page is Securables, where we could get more granular and provide permissions on…

Contents