Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding SQL Server 2008 Security, Logins, Roles etc

Tags:

People also ask

What is the difference between logins and users in SQL Server?

A login provides to a user or application the ability to connect to a SQL Server instance, whereas a database user provides the login rights to access a database. Each database a login needs access to will require a database user to be defined, except when a login has been given sysadmin rights.

What is the difference between a login and a credential in SQL?

Login: A login is any principal that is granted access to a SQL Server instance. The access can be granted to domain users, domain group, or SQL Server authenticated accounts. Credential: A credential provides a mechanism to store login information for a domain account within SQL Server.

How do I get list of logins and permissions in SQL Server?

Using SQL Server Management Studio First, move to “Object Explorer” and expand the database that you want. Next, under the database, expand the “Security” directory. Now, under Security, expand the “Users” option. This will display a list that contains all the users created in that database.


I having trouble understanding some core concepts in SQL Server 2008. Until recently I haven't had to care much about security, users, schemas etc.

  1. What is the difference between a Login and a User?

  2. How do these relate to roles

  3. What is a schema? (Until I started reading about security I thought a schema was just a database design?!)

  4. I'd like to be able to create a script to create my Users, Logins, especially as IIS attempts to connect to SQL Server as it's app pool. Can anyone point me in the direction of some examples of scripting this kind of thing?

Thanks in advance!

P.S:
I've been trying to read some MSDN articles about this stuff and getting a bit lost for example this seemed out of my depth:

http://msdn.microsoft.com/en-us/library/ms190387.aspx


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!