Re: Who should I make the owner?

From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 01/01/05


Date: Sat, 1 Jan 2005 08:42:19 -0800

Sa is a login name. DBO is a user name in a database. You can read about the
difference between logins and users in the Books Online.

Every login gets mapped to a username in every database they have access to.
Sometimes the login name and the user name are the same string, so a login
sue could be user sue in one or more databases.

DBO is a special user name that exists in every database. Sa, and any login
in the sysadmin role, automatically get mapped to the dbo user name in EVERY
database. Also, the login listed in sysdatabases as the owner of the
database has the user name DBO in that database. I strongly suggest you try
NOT to think of DBO as meaning 'database owner' since many different logins
can map to that user name. Just think of DBO as another user name.

The user DBO has special privileges in a database, which you can read about
in the Books Online. In addition to the privileges the dbo user has, any
object owned by the dbo user can be accessed without specifying the owner
name, but it's actually recommended that you always specify the owner name
for any object:

select column1, column2, ...
 from dbo.mytable

-- 
HTH
----------------
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"thechaosengine" <na> wrote in message 
news:eExLldA8EHA.1408@TK2MSFTNGP10.phx.gbl...
> OK thanks for that.
>
> Can you tell me what the significance of dbo is? Is that a special account 
> for just this purpose?
>
> Thanks
> 


Relevant Pages

  • Re: Accidentally dropped DBO from database
    ... That error is due to having databases where the owner (dbo) ... is mapped to a login that doesn't exist on the server. ... a user in the database" when using sp_changedbowner, ...
    (microsoft.public.sqlserver.security)
  • Re: Confused about dbo
    ... Make sure you understand the difference between login names and user names. ... database within a SQL Server instance. ... There are several ways you could have the username dbo. ... the true owner of the database. ...
    (microsoft.public.sqlserver.security)
  • Re: db_owner role in SQL 2k
    ... The owner of a database is a login, which is listed in the sysdatabases ... I try not to think of DBO as the Database Owner, but just as special, ... For anyone to use any database, their login name must have been given access ...
    (microsoft.public.sqlserver.programming)
  • Re: Login Name is missing
    ... Database ownership determines to login mapping for the 'dbo' user. ... > I see 'dbo' listed as the OWNER of all the tables. ...
    (microsoft.public.sqlserver.security)
  • Re: properties owner and users owner.
    ... 'dbo' is a special database user and must exist in every database. ... normally be the same login but can get out-of-sync in some situations, ... owner entries are synchronized: ...
    (microsoft.public.sqlserver.server)