Understanding SQL Server 2008 Security, Logins, Roles, etc.

I had trouble understanding some basic concepts in SQL Server 2008. Until recently, I didn't have to worry about security, users, schemas, etc.

  • What is the difference between username and user?

  • How do they relate to roles

  • What is a circuit? (Until I started reading about security, I thought the schema was just a database design!)

  • I would like to create a script to create my users, logins, especially when IIS tries to connect to SQL Server as an application pool. Can someone point me towards some examples of scenarios of this kind?

Thanks in advance!

PS:
I tried to read some MSDN articles about this material and got a little lost, for example, it looked from my depth:

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

+7
source share
1 answer
  • A login is the main one that is used to connect to the server. user is the primary user used to connect to the database. The security context in the instance itself is dictated by login , its roles and permissions / denials. The security context in the database is determined by the user , his roles and permissions / denials.
  • Like all other role-based systems, roles are logical permission groupings. Roles can be applied to users and logins. For commonly used permission sets, there are fixed server roles and fixed database roles .
  • Scheme - This is a database object that is used for two things: the logical separation of database objects (tables, stored procedures, functions, views) and security separation. The schema contains these objects. And users can be granted / denied rights to schemes implicitly granted / prohibiting rights to objects contained inside.

4 actually doesn't seem like a question. Can you redo

+6
source

All Articles