BUG: Database Owner is Not Associated w/ User Id DBO (226488)
The information in this article applies to:
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q226488
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.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. 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.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbBug kbpending KB226488 |
---|
|