Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (20.3k points)

I have recently been running into many different areas of SQL Server that I normally don't mess with. One of them that has me confused is the area of Logins and Users. Seems like it should be a pretty simple topic...

It appears that each login can only have 1 user and each user can only have 1 login.

A login can be associated with multiple tables thus associating that user to many tables.

So my question is why even have a login and a user? they seem to be pretty much one and the same. What are the differences, or what is it that I seem to be missing?

1 Answer

0 votes
by (40.7k points)

The "Login" grants the principal entry into the SERVER. Whereas, the "User" grants a login entry into a single DATABASE. Here, one "Login" will be associated with many users (i.e. one user per database).

All the objects can have permissions granted to it at their own level.

For more information, refer to  Database Users and Principals.

Browse Categories

...