Results 1 to 3 of 3

Thread: User question

  1. #1
    Join Date
    Nov 2003
    Posts
    68

    Unanswered: User question

    When you create a new database which user is the owner of your table dbo or a specific user as oracle.

  2. #2
    Join Date
    Nov 2003
    Location
    London
    Posts
    169
    DBO (sa login) will be the default owner, although you can add additional database owners

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by philio
    When you create a new database which user is the owner of your table dbo or a specific user as oracle.
    You've mixed terms, so I can't give you a simple answer.

    Logins and users are two distinct but related things. Logins exist on a server, and control access to the server itself. Users exist within a database, and control access not to the database but to the objects (tables, views, procedures, etc) within that database. A relationship is tracked for each user that shows which login it corresponds to, and each login should only map to one user (things get really confusing otherwise).

    When a SQL Login creates a database, that login will own the database from the server's perspective. This ownership information is stored in master.dbo.sysdatabases, and only one login can own any given database.

    Within a database, there is a role called db_owner. Any user that is a member of this role has the same permissions as the database owner. This has no impact whatsoever on the associated login.

    Objects are owned by exactly one user. By convention, most people choose to make that user dbo, because dbo is the second user in the normal "seach chain" for object names, so it makes it easier for everyone to refer to the object... This gets rather complex to explain, but if you've got more questions, I'll gladly try to explain.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •