Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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: Tuesday, August 2, 2016 7:30 PM
Points: 21, Visits: 578
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 @ 2:39 PM
Points: 14,540, Visits: 38,379
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #815935
Posted Monday, November 9, 2009 10:17 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, August 2, 2016 7:30 PM
Points: 21, Visits: 578
very clear, thanks a lot!
Post #815939
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse