|
|
Posted by Erland Sommarskog on 08/27/05 00:19
Peter CCH (petercch.wodoy@gmail.com) writes:
> But I'm curious on one thing, since a database must be own by a user,
> how come when I try to create a new database, the "dbo" user is not
> tied to any login?
>
> I tried create a new database, then expand the tree node and look at
> the "Users" section, then I saw this:
>
> Name Login Name Database Access
> -----------------------------------------------------------------------
> dbo Permit
>
> Above is the "Users" section of a newly created database on my PC, for
> the purpose of to confirm whether a user must tied to a login, I just
> wondering why the "dbo" is not tied to any login.
It appears that you only see a login name, if this is an SQL Server
login. So if the database is owned by a Windows login, you don't see
this. The same thing happens if you say "sp_grantdbaccess DOMAIN\user"
to permit access for a windows login, the LoginName column is NULL.
But that is only the trick of the eye. If you would try to add the
Windows user that owns the database, you would be told that is is
already there.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Navigation:
[Reply to this message]
|