dbo vs db_owner?

  • 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?

  • 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!

  • very clear, thanks a lot!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply