July 13, 2009 at 5:01 am
Hi all
Let me apologise if this topic has been covered already. I searched the forums and could not find anything suitable so please feel free to direct me to a link if it has been explained already.
I have an understanding of Users,logins,schemas etc that allows tme to do my job but I am wanting to do some soft SQL training for some junior guys in my dept.
Can anyone give me a nice concise explanation of the following.
LOGIN
USER
SCHEMA
OWNER
ROLE
Thanks in advance.
July 13, 2009 at 6:51 am
Login = account that allows you to connect to the SQL Server. Also known as server principal. Can be a SQL Server login, a Windows user login, or a Windows group login.
User = Once connected to SQL Server, a user allows one to connect to a particular database. This is done by mapping the login to the user. Also known as a database principal. It is possible to have a user that is not mapped to a login (if you use the WITHOUT LOGIN clause with CREATE USER).
Role = A grouping which permissions can be assigned to. Similar to Windows groups. Roles can be created within a database and are known as user-defined database roles. The security best practices model is to create the appropriate roles, place users in them, and assign security only to the roles (like using Windows groups in the operating system).
Schema = A container that holds the traditional objects like tables, views, and stored procedures. Similar to namespaces in the programming world.
Owner = As the name implies, who owns the object (which will be a user for the more common objects). This is important for ownership chaining. In the case of tables and views, if there isn't an explicit owner defined, then the owner of the schema to which the object belongs is considered to be the owner of the object.
K. Brian Kelley
@kbriankelley
July 13, 2009 at 6:58 am
Perfect. That is exactly what I was looking for.
Thank you!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply