Hi ,
What is the diff between Logins & Users in SQL Server?
thanks
Babu
A login is a server principal, create and granted access at the server level. To allow a user access to the database you will have to map him / create a new database principal (You named it user, could also be a Windows security group). Server Principals can also be mapped to Database roles like the sa to dbo which avoid creating a database principal in the database.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||
Hi,
- The login is to be able to access the SQL Server Instance. Here you will add Windows accounts that can access the server. By default the Administrators group of the pc running the SQL Server Instance is added to the Logins. It is also possible to create SQL Server accounts like the sa account.
- The Users in SQL Server are used to give permissions to database objects like databases/tables/views/... . A user maps to a login.
- The Roles in SQL Server make it easier to give a group of permissions to users in case of setting all these permissions one by one. You have roles on database and on server level. For example the sa account is added to the sysadmin server role meaning that it has full control over everything within that server.
So in order to be able to perform queries on a table you need the following:
a login to connect to the server
No comments:
Post a Comment