Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / October 2005

Tip: Looking for answers? Try searching our database.

Cannot change the database owner

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rich - 24 Oct 2005 21:11 GMT
Hello Group,

I have restored a database to a server and want to change the owner from me
to the SA.  I have tried to use " Exec sp_changedbowner 'sa' " but get this
error:

Server: Msg 15110, Level 16, State 1, Procedure sp_changedbowner, Line 46
The proposed new database owner is already a user in the database.

I have done this at least hundred times without a problem, what is this
error saying about the USER?  I am trying to chang the owner...

Rich
Geoff N. Hiten - 24 Oct 2005 21:32 GMT
SA is already mapped to a user in the database.  Delete that user and retry
the command.

Signature

Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP

> Hello Group,
>
[quoted text clipped - 11 lines]
>
> Rich
Dan Guzman - 25 Oct 2005 01:07 GMT
To add to Geoff's response, you might also get the error if the current
database owner is not linked correctly.  In that case, you can work around
the problem by changing the database owner to another login and then to
'sa':

USE MyDatabase
EXEC sp_addlogin 'TempOwner'
EXEC sp_changedbowner 'TempOwner'
EXEC sp_changedbowner 'sa'
EXEC sp_droplogin 'TempOwner'

Signature

Hope this helps.

Dan Guzman
SQL Server MVP

> Hello Group,
>
[quoted text clipped - 11 lines]
>
> Rich
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.