patternsqlMinor
Property Owner is not available for Database 'DBNAME'
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:
Getting the following message:
The proposed new database owner is already a user or aliased in the database.
Any Ideas how to fix this ?
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'
goCode Snippets
use DBNAME
go
exec sp_changedbowner 'myLoginThatShouldBeDBO'
goContext
StackExchange Database Administrators Q#7511, answer score: 4
Revisions (0)
No revisions yet.