HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Property Owner is not available for Database 'DBNAME'

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
dbnameowneravailabledatabasepropertyfornot

Problem

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 ?

Solution

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

Code Snippets

use DBNAME
go

exec sp_changedbowner 'myLoginThatShouldBeDBO'
go

Context

StackExchange Database Administrators Q#7511, answer score: 4

Revisions (0)

No revisions yet.