Using Sqlserver 2000. We recently changed the ownership of a database using
sp_changedbowner 'new_owner', true. According to BOL, when the second
argument is true, the existing dbo alias for that database should be remappe
d
to new_owner. Although the database ownership did change to new_owner, the
Users display still shows dbo mapped to the old owner. Am I using
sp_changedbowner correctly? How do I remap the dbo user in that database to
the new owner?
--
MunchingBillThe login specified as the new dbowner should get mapped as the new 'dbo'
user regardless of the @.map specification. Did you refresh Enterprise
Manager?
Note that the @.map parameter indicates that existing *aliases* are remapped.
The dbo user is always remapped to the specified login. Aliases are a
backwards compatibility feature that allows multiple logins to be mapped to
the same database user.
Hope this helps.
Dan Guzman
SQL Server MVP
"MunchingBill" <munchingbill@.newsgroups.nospam> wrote in message
news:8FBEDA24-8F33-4FD7-BE5C-BE9B318D305C@.microsoft.com...
> Using Sqlserver 2000. We recently changed the ownership of a database
> using
> sp_changedbowner 'new_owner', true. According to BOL, when the second
> argument is true, the existing dbo alias for that database should be
> remapped
> to new_owner. Although the database ownership did change to new_owner, the
> Users display still shows dbo mapped to the old owner. Am I using
> sp_changedbowner correctly? How do I remap the dbo user in that database
> to
> the new owner?
> --
> MunchingBill
Showing posts with label remap. Show all posts
Showing posts with label remap. Show all posts
Monday, March 26, 2012
How To Remap Back To DBO?
How to I change the owner (schema) in SQL 2005 back to dbo from a SQL Server
login? I want this:
someuser.sometable
to be:
dbo.sometable
Thanks!
======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485Using alter schema - for example:
ALTER SCHEMA dbo
TRANSFER someuser.sometable
-Sue
On Mon, 11 Sep 2006 14:28:01 -0700, dotNetDave
<dotNetDave@.discussions.microsoft.com> wrote:
>How to I change the owner (schema) in SQL 2005 back to dbo from a SQL Serve
r
>login? I want this:
>someuser.sometable
>to be:
>dbo.sometable
>Thanks!
>======================================
>David McCarter
>www.vsdntips.com
>VSDN Tips & Tricks .NET Coding Standards available at:
>www.cafepress.com/vsdntips.20412485
login? I want this:
someuser.sometable
to be:
dbo.sometable
Thanks!
======================================
David McCarter
www.vsdntips.com
VSDN Tips & Tricks .NET Coding Standards available at:
www.cafepress.com/vsdntips.20412485Using alter schema - for example:
ALTER SCHEMA dbo
TRANSFER someuser.sometable
-Sue
On Mon, 11 Sep 2006 14:28:01 -0700, dotNetDave
<dotNetDave@.discussions.microsoft.com> wrote:
>How to I change the owner (schema) in SQL 2005 back to dbo from a SQL Serve
r
>login? I want this:
>someuser.sometable
>to be:
>dbo.sometable
>Thanks!
>======================================
>David McCarter
>www.vsdntips.com
>VSDN Tips & Tricks .NET Coding Standards available at:
>www.cafepress.com/vsdntips.20412485
Labels:
back,
database,
dbo,
microsoft,
mysql,
oracle,
owner,
remap,
schema,
server,
serverlogin,
sometableto,
sql,
thissomeuser
Subscribe to:
Posts (Atom)