Re: Changing DB Owner
From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 08/17/04
- Next message: Zarko Jovanovic: "Re: Free/Used space of a transaction log file"
- Previous message: surajits: "RE: Free/Used space of a transaction log file"
- In reply to: Mike B.: "Changing DB Owner"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 17 Aug 2004 07:43:01 -0500
sp_changedbowner ought to work with both Windows and SQL logins. The
specified login must not already be a user in the database. Examples below.
--standard login
USE MyDatabase
EXEC sp_changedbowner 'SQLAdmin'
--Windows login
USE MyDatabase
EXEC sp_changedbowner 'Domain\SQLAdmin'
-- Hope this helps. Dan Guzman SQL Server MVP "Mike B." <Autobahn97@hotmail.com> wrote in message news:e$ytVNFhEHA.3428@TK2MSFTNGP11.phx.gbl... > Inadvertantly I moved several DB's from one SQL box to another however when > I reattached the DB's onte Target server I was logged in as the incorrect > user so the DB Owner shows up as my personal login and not the > Domain\SQLAdmin user which we are supposed to perform maintanence under > (oops). I suspect things worked because my login ID is domain admin. I did > find the command sp_changedbowner however I think it only works with SQL > users and not Windows Domain users. If this is correct could some one > please send/post the exact syntax to change the DB owner from Domain\mylogin > to Domain\SQLAdmin? Thanks! > >
- Next message: Zarko Jovanovic: "Re: Free/Used space of a transaction log file"
- Previous message: surajits: "RE: Free/Used space of a transaction log file"
- In reply to: Mike B.: "Changing DB Owner"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|