Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
please tell me the difference between user and login in sql server...?
Posted
Comments
King Fisher 11-Jul-15 1:07am    
what do you mean user and login?
I don't get you.

1 solution

Login defines you access to the SQL Server. Having a login let's you communicate with the database. The login has definition for the authentication (username and password or windows authentication) and for a login you can define server wide privileges.

User instead defines access to a single database within the same SQL Server where you have a login. User definition contains privilege definitions inside that database. For example if your SQL Server instance has 5 databases your login may have access only to 2 of those so it's a user in two databases.

Have a look at the statements for creating both. It'll explain a lot:
- CREATE LOGIN[^]
- CREATE USER[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900