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 users

Create and maintain users - SQL Server Tutorial

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

Start my 1-month free trial

Create and maintain users

- Production databases usually serve a wide variety of business requirements, and it's often the case that very few users will actually need access to the breath of content that they're storing. In order to provide another layer of protection over your data, database users need to have their permission maintained in order to ensure that they have access to the materials that they need, but don't have access to the data that they don't. Let's take a look at creating a couple of new users for the Wide World Importers database and see how we can manage the objects that they have access to. First, we want to make sure that we're working within the Wide World Importers database. Then we can take a look at the current security context that Sequel Server is treating us as. To do that, we'll execute a select statement across a couple of built-in functions. The function user underscore name will return the name of the user that Sequel Server is currently treating us as. S user underscore S…

Contents