4

Property Owner is not available for Database 'DBNAME'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

I am getting this error when trying to 'right click' a properties on the database. Does anyone know how to fix this ?

I've tried following:

use DBNAME
EXEC sp_changedbowner 'myUser'

Getting the following message:

The proposed new database owner is already a user or aliased in the database.

Any Ideas how to fix this ?

migrated from stackoverflow.com Nov 2 '11 at 15:16

This question came from our site for professional and enthusiast programmers.

  • SQL 2000: EXEC MyDatabase..sp_changedbowner ‘sa’; SQL 2005 and SQL 2008 ALTER AUTHORIZATION ON DATABASE::MyDatabase to sa; – user896048 Nov 1 '11 at 12:39
3

myUser is probably already a database user. You shoudl be passing a login principal to the stored procedure. Do something like this:

use DBNAME
go

exec sp_changedbowner 'myLoginThatShouldBeDBO'
go

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy