Re: Changing DBO

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 09/29/04

  • Next message: Hari Prasad: "RE: xp_cmdshell"
    Date: Tue, 28 Sep 2004 19:13:03 -0500
    
    

    You need to first change the ownership of the existing objects to 'dbo'
    using sp_changeobjectowner. You can then remove the existing database user
    using sp_revokedbaccess and change database ownership to that account with
    sp_changedbowenr.

    -- 
    Hope this helps.
    Dan Guzman
    SQL Server MVP
    "JLFleming" <anonymous@discussions.microsoft.com> wrote in message 
    news:0c0a01c4a57a$d354f510$a601280a@phx.gbl...
    >
    > I have assigned an SQL account as DBO of a database.  I
    > am going to change the DBO to a Windows login account.
    > When I run the sp_changedbowner stored procedure, will
    > change the owner of the objects created by the SQL
    > account?  The table objects have the SQL account as the
    > owner.  If not, will I have to run the
    > sp_changeobjectowner too?
    >
    >
    > Thank you,
    > JLFleming 
    

  • Next message: Hari Prasad: "RE: xp_cmdshell"

    Relevant Pages

    • Re: ADP/SQL Server 2000 Security Problem
      ... > I originally added the database by detaching it from MSDE 2000 and then ... > I'll also test using a SQL Server account and see what happens. ... >> The owner of the dbo account shouldn't have any effect. ... there are no SQL Server user accounts. ...
      (microsoft.public.access.adp.sqlserver)
    • Re: dbo issues
      ... I assume that the database owner is 'sa'. ... dbo user, thus automatically creating 'dbo' owned objects. ... > users included in this Windows Group Account. ...
      (microsoft.public.sqlserver.security)
    • Re: How do I set the login name for a user?
      ... You are better to make a dbo roled account (database god?), although that is not my first recommendation for connections. ... name, key name, without login. ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: How to drop login name with the dbo account
      ... DBO is a user name in a database ... It must map to an account in the master database. ... > Currently the dbo account contains login name "pfweb_admin". ...
      (microsoft.public.sqlserver.programming)
    • SQL rights for SPS
      ... Once the database is created and connected to SPS2003, ... the SQL account be demoted to DBO? ... We have SQL on a server with other databases, ...
      (microsoft.public.sharepoint.portalserver)