Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

dbo vs db_owner? Expand / Collapse
Author
Message
Posted Monday, November 9, 2009 10:07 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 2:09 PM
Points: 21, Visits: 470
What is the difference between these two database roles?. and which one has the full control of the database. As i understand it dbo, is the owner of the database. Why then are we having the db_owner rols?
Post #815931
Posted Monday, November 9, 2009 10:13 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:10 PM
Points: 12,909, Visits: 32,012
bugop (11/9/2009)
What is the difference between these two database roles?. and which one has the full control of the database. As i understand it dbo, is the owner of the database. Why then are we having the db_owner rols?


only one of them is a role. db_owner is a role, and you could have multiple users tied to that role.

obviously, the role db_owner decides what objects you are allowed to fiddle with and what rights the user has.

dbo is the schema that the objects belong to...in SQL 2000, it was actually the user the objects belonged to, but it has been abstracted out. the schema is used to logically collect groups of objects.

dbo is also the "default" schema that is used if the schema is not specified.

you can create a multiple schemas in a database if you want, and each schema could have a table with the same name, so dbo.Invoices could exist right along side of Production.Invoices.

I could create a different role that has onl,y permissions for the Production schema, where db_owner has access to all schemas.
hope that helps


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #815935
Posted Monday, November 9, 2009 10:17 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Today @ 2:09 PM
Points: 21, Visits: 470
very clear, thanks a lot!
Post #815939
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse