SQL SERVER – Error: Property Owner is not available for Database '[DB_NAME]'. This property may not exist for this object, or may not be retrievable

Problem.


Error: Property Owner is not available for Database '[DB_NAME]'.

This property may not exist for this object, or may not be retrievable
due to insufficient access rights. (Microsoft.SqlServer.Smo)


This a common error that happens when we try to access the database options and the database doesn’t have owner. The database can not be an owner because somebody clean the owner property, or the user (owner) was deleted, etc.


Solution / Fix / Workaround.


Is necessary to assign a proper owner for the database. To know what are the valid owners for the database, we can execute the following query:


select databases.name,server_principals.name

from sys.[databases]

inner join sys.[server_principals]

on [databases].owner_sid = [server_principals].sid


To assign the owner for the database:


USE <SID>

Go


sp_changedbowner ''

Go

3 comentarios:

Unknown dijo...

Nice Post!! Hyderabad is also one the best places in India for residence and business. Hence, Hyderabad could the right choice for property investment. If anyone is looking for Hyderabad property for sale.From where you can find best properties that are matching with your requirements.

Selaa Infra Services dijo...

Independent House for Sale at Banjara Hills Hyderabad
Email : selaa.hyd@gmail.com

Contact : 9032763377

Property Type : Independent house
Transaction : Sale
Price :6 Crores
Size : 600 Sq Yards
Location : Banjara Hills Near Lv prasad Eye hospital,Banjara hills, Hyderabad

Shambhu Kumar dijo...
Este comentario ha sido eliminado por el autor.

Publicar un comentario