BUG: Database Owner is Not Associated w/ User Id DBO

ID: Q226488


The information in this article applies to:
  • Microsoft SQL Server version 7.0

BUG #: 55136 (SQLBUG_70)

SYMPTOMS

The following section in SQL Server Books Online (BOL) incorrectly states that the database owner (member of db_owner database role) is associated with the user ID database owner (DBO).

Building SQL Server Applications/Transact-SQL Reference/CREATE TABLE (T-SQL)

Arguments:

owner

Is the name of the user ID that owns the new table. owner must be an existing user ID in the database specified by database_name. owner defaults to the user ID associated with the login for the current connection in the database specified in database_name. If the CREATE TABLE statement is executed by a member of the sysadmin fixed server role, or a member of the db_dbowner or db_ddladmin fixed database roles in the database specified by database_name, owner can specify a user ID other than the one associated with the login of the current connection. If the CREATE TABLE statement is executed by a login associated with a user ID that has been granted only create table privileges, owner must specify the user ID associated with the current login. Members of the sysadmin fixed server role, the database owner, or logins aliased to the dbo user are associated with the user ID dbo; therefore, tables created by these users default to having dbo as the owner. Tables created by any logins not in either of these two roles have owner default to the user ID associated with the login.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0.


MORE INFORMATION

Please refer to the following section in SQL Books Online, which specifically states that members of the sysadmin fixed server role and not db_owner database role are associated with the user ID dbo.

Administering SQL Server/Managing Security/Setting Up Security Accounts/Database Owner (dbo)

Any member of the sysadmin fixed server role is mapped to a special user inside each database called dbo. Any object created by any member of the sysadmin fixed server role belongs to dbo automatically.

For example, if user Andrew is a member of the sysadmin fixed server role and creates a table T1, T1 belongs to dbo and is qualified as dbo.T1, not as Andrew.T1.

Conversely, if Andrew is not a member of the sysadmin fixed server role but is a member only of the db_owner fixed database role and creates a table T1, T1 belongs to Andrew and is qualified as Andrew.T1.

Additional query words: documentation; doc bug

Keywords : kbSQLServ700bug
Version : winnt:7.0
Platform : winnt
Issue type : kbbug


Last Reviewed: January 3, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.