Re: New DBs DBO does not have an associated login name

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 02/09/04


Date: Mon, 9 Feb 2004 08:25:01 -0800

Ok, so the database does have an owner. EM uses a different query to extract
the owner name, and if is an owner that that is actually a member of an NT
group, so that they don't have their own entry in syslogins, EM will not
show the name. This could be considered a bug in EM, if you want to call PSS
about it.

There is no way to force EM to display the owner name without insisting that
MS issue a fix.

There are two alternatives
    1. Add the NT login as a valid login in its own right, and put it in the
sysadmin server group. (I am assuming the current login should be in that
group.)
    2. Change the owner using sp_changedbowner to a login name that exists
in syslogins.

--
HTH
----------------
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"KJ" <armchairqb2000!@hotmail.com> wrote in message
news:uPeYEXx7DHA.1592@TK2MSFTNGP10.phx.gbl...
> When I run the stored proceedure I get the NT username that I was logged
in
> to when I created the DB.  But under Enterprise Manager when I drill down
to
> the DB and select users the DBO has no associated logon.  Under SQL 7 when
I
> created a new DB it would show the DBO in that location.
>
>
> "Kalen Delaney" <replies@public_newsgroups.com> wrote in message
> news:##xb8Bf7DHA.3880@tk2msftngp13.phx.gbl...
> > Hi KJ
> >
> > How are you determining that there is no associated login name? What do
> you
> > get when you run
> >
> > exec sp_helpdb <name of database>
> >
> > --
> > HTH
> > ----------------
> > Kalen Delaney
> > SQL Server MVP
> > www.SolidQualityLearning.com
> >
> >
> > "KJ" <armchairqb2000!@hotmail.com> wrote in message
> > news:#V3Y2fb7DHA.2480@TK2MSFTNGP12.phx.gbl...
> > > When I create a new DB on a new SQL 2000 server I have it adds the DBO
> but
> > > does not have an associated login name.  How do I fix this?
> > >
> > > Thanks,
> > >
> > > KJ
> > >
> > >
> >
> >
>
>


Relevant Pages

  • 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: not creating tables as dbo anymore ?
    ... Database Owner (dbo) ... existing user ID in the database specified by database_name. ... with the login of the current connection. ...
    (microsoft.public.sqlserver.security)
  • Re: dbo with user name in "users"
    ... be that one of them owned the database and because the login/user has been ... has something to do with not being able to validate the login. ... changing the owner to sa is usually a great ... for dbo, I get an error: "cannot insert the value NULL into column '', ...
    (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)
  • 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)