Re: not creating tables as dbo anymore ?

From: Dan Guzman (danguzman@nospam-earthlink.net)
Date: 03/05/03


From: "Dan Guzman" <danguzman@nospam-earthlink.net>
Date: Wed, 5 Mar 2003 09:18:33 -0600


To create dbo-owned objects without explicitly specifying dbo as the
owner, the user must be either:

    a sysadmin role member (sp_addsrvrolemember)
    the database owner (sp_changedbowner)
    aliased to dbo (sp_addalias)

If sysadmin is overkill, I suggest you change the database owner to the
desired login. Aliases are provided only for backward compatibility.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
-----------------------
SQL FAQ links (courtesy  Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------
"Francis" <FMignault@newtrade.com> wrote in message
news:036301c2e328$d7e26290$3001280a@phx.gbl...
> I would like it to create the tables as dbo without
> specifying it.
>
> I know it is possible because it was doing it before but
> something changed and I don't know what.
>
> I saw that there is a dbo user associated to the database.
> Can I associate my user to it ?
>
> Francis.
>
> >-----Original Message-----
> >Hello, Francis!
> >
> >Have the user create the table using CREATE TABLE
> dbo.TableName(...........
> >
> >
> >
> >--
> >
> >Allan Mitchell (Microsoft SQL Server MVP)
> >MCSE,MCDBA
> >www.SQLDTS.com
> >I support PASS - the definitive, global community
> >for SQL Server professionals - http://www.sqlpass.org
> >
> >: I have userA that has access to one database as
> >: db_owner.
> >
> >: How come, when I create a table it is not owned by dbo ?
> >: It creates the tables as userA.table ...
> >
> >: I don't understand. How can I setup the user so that it
> >: will create objects as dbo ?
> >
> >      ---  Microsoft CDO for Windows 2000
> >
> >
> >.
> >


Relevant Pages

  • Re: Roles & Users
    ... "John Bell" wrote in message ... >> I think just saying things like 'dbo is the database owner' can lead to ... >> It is the user name assumed by the login listed in sysdatabases as the ...
    (microsoft.public.sqlserver.server)
  • Re: Will anyone know this?
    ... they're not dbo owned they're taylorb owned - ... but I am set up to be the 'dbowner' - there's intense ... Am I the database owner, ... >objects not being created under the proper user. ...
    (microsoft.public.sqlserver.security)
  • Re: Developer design Best Practices
    ... > test - they develop them and then I move them, and the owner is dbo. ... > There is NO DBO User in our dev database!! ... just means it is owned by the database owner, ... to have a busy dba monitoring development servers. ...
    (microsoft.public.sqlserver.server)
  • Re: Will anyone know this?
    ... Is there any particular reason why they are owned by you (taylorb)? ... not make them all dbo and the issue goes away. ... > but I am set up to be the 'dbowner' - there's intense ... > account the database owner, ...
    (microsoft.public.sqlserver.security)
  • Re: Groups for dbo
    ... Thanks for the instructions on changing the database owner...I suspect ... While dbo is SUPPOSED to be a special user that's not used for routine ... It's probably safer to change the database owner in any event, ... >> I'm still fairly new to SQL Server, and I'm trying to figure something ...
    (microsoft.public.sqlserver.security)