Re: dbo association
From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 08/18/03
- Next message: Art Ringler: "RE: GRANT - Execute SP"
- Previous message: Kalen Delaney: "Re: GRANT - Execute SP"
- In reply to: Mark: "dbo association"
- Next in thread: Mark Mcgaughey: "Re: dbo association"
- Reply: Mark Mcgaughey: "Re: dbo association"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 18 Aug 2003 12:23:12 -0500
The dbo user is a special case; database ownership determines the login
mapping for the dbo user. You can change database ownership with
sp_changedbowner:
Use MyDatabase
EXEC sp_changedbowner 'MyLogin'
GO
In some cases, you may get ambiguous message 'the proposed owner is
already a user in the database'. You can workaround the error by
temporarily changing ownership to a non-conflicting login:
Use MyDatabase
EXEC sp_addlogin 'TempOwner'
EXEC sp_changedbowner 'TempOwner'
EXEC sp_changedbowner 'MyLogin'
EXEC sp_droplogin 'TempOwner'
GO
-- 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 ----------------------- "Mark" <mar.mcgaughey@milestonelp.com> wrote in message news:0aa701c365a6$36da7990$a601280a@phx.gbl... > I have restored a data base backup from a different sql > server that has different users "dbo" for instance. How > can I associate "dbo" in the security login with one that > is created in the database table that was restored? Will > it matter? I have tried to use the following procedure but > will not work for any member of the security group. > sp_change_users_login [ @Action = ] 'action' > [ , [ @UserNamePattern = ] 'user' ] > [ , [ @LoginName = ] 'login' ] > > auto_fix, Update_one will not work either. > > Thank you for your help
- Next message: Art Ringler: "RE: GRANT - Execute SP"
- Previous message: Kalen Delaney: "Re: GRANT - Execute SP"
- In reply to: Mark: "dbo association"
- Next in thread: Mark Mcgaughey: "Re: dbo association"
- Reply: Mark Mcgaughey: "Re: dbo association"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|