Is dbo the a user (database owner) or a schema?

  • Under a user profile I am investigating the permissions. Under the page called 'Securables,' I clicked on the 'Search' button and showed a particular table called 'tblEmployee.' Under the 'Securables' window pane, the only securable shown is named as follows:

    Schema = dbo

    Name = tlbEmployee

    Type = Table

    Under the Permissions window pane, under the 'Explicit' tab, the 'Update' permission has 'dbo' as the Grantor (I previously assigned update as a permission).

    My question is this:

    What is 'dbo?'

    Supposedly it stands for 'database owner' implying that 'dbo' is a user. On the other hand, under the 'Schema' column in the 'Securables' window pane, 'dbo' is shown as a value, implying that 'dbo' is a schema.

  • The dbo schema is a schema, the dbo user is a user that owns the dbo schema and is a member of the db_owner role by default. A user and a schema are separate objects. A schema is a container for tables, procedures, views, functions and other objects. A user is a security context object which can own other objects. Originally they were synonymous. They were made separate in SQL 2000.

  • This really helps to clear things up. Thank you.

  • Joe,

    Suppose that on SQL server we have 5 databases.

    When a schema groups database objects, do all those objects have to be within the same database?

    Or can a schema include some objects from database1 and some objects from database 4 and yet some objects from database5?

  • michael.leach2015 wrote:

    Joe, Suppose that on SQL server we have 5 databases. When a schema groups database objects, do all those objects have to be within the same database? Or can a schema include some objects from database1 and some objects from database 4 and yet some objects from database5?

    Only within the same database.  Several databases may have schemata with the same name, but they are different objects.

     

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 5 posts - 1 through 4 (of 4 total)

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