From the course: SQL Server 2008 Essential Training

Unlock the full course today

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

Adding a Windows user to the database

Adding a Windows user to the database - SQL Server Tutorial

From the course: SQL Server 2008 Essential Training

Start my 1-month free trial

Adding a Windows user to the database

The best practice for working with security in SQL Server is that you're using Windows authentication. That means before anybody actually accesses your SQL Server, they have had to log on to the domain or even log on to the local machine, as a legitimate Windows user, that user already exists. What that means is your job inside SQL Server is not declaring that there's a certain user called Barbara, certain user called Alice, but you're saying what is that user allowed to do in SQL Server. And this is the way that we do it. Instead of opening up my Databases section, I am going to expand my Security and take a look right now at my Logins. Now, right now, I don't have a lot. In fact most of these are essentially background and service accounts because I haven't added anybody to access this instance yet. So I am going to right click the Logins folder and say New Login. Let's be very clear about what we're doing. We are not actually creating a user here. The user already needs to exist…

Contents