Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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 ?

share|improve this question

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

1 Answer 1

up vote 3 down vote accepted

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.