Troubleshooting Property Owner is not available for Database Issue in SQL Server


Jun 15, 2012

Introduction

In this article we will see the steps which you need to follow to resolve the following error message in SQL Server “Property Owner is not available for Database. This property may not exist for this object, or may not be retrievable due to insufficient access rights”. The steps mentioned in this article are applicable to SQL Server 2005 and higher versions.

When you will see this error message in SQL Server

You will see the below mentioned error message when you Right click Database and Select Properties from the drop down menu in SQL Server to view the Database Properties.

Error Message

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

Property Owner is not available for Database. This property may not exist for this object, or may not be retrievable due to insufficient access rights

SQL Server throws the above mentioned error when the owner of the database is UNKNOWN.

TSQL script to identify Database Owner

You can identify who is the owner of the database using SP_HELPDB system procedure or using the below mentioned TSQL Script.

Use Master
GO

SP_HELPDB
GO
Identify Database Owner in SQL Server Using sp_helpdb
Use Master
GO

SELECT 
	 SD.name	AS [Database Name]
	,SSP.name	AS [User Name]
	,SD.state_desc AS [Database Status]
 FROM sys.databases AS SD
	INNER JOIN sys.server_principals AS SSP
ON SD.owner_sid = SSP.sid
GO

Resolution

Using sp_changedbowner system stored procedure you can assign SA login as the owner of the user database which had shown ownership issues. Execute the below mentioned TSQL code against the database for which you are unable to open database properties.

USE ReportServer
GO

EXEC sp_changedbowner 'sa'
GO

USE ReportServerTempDB
GO

EXEC sp_changedbowner 'sa'
GO

Continue Free Learning...

  • Please leave below your valuable feedback for this article.
  • Feel Free to refer this article to your friends and colleagues using the below “Share this Article” option.
  • Do subscriber to our News Letter to continue your free learning.
  • Don’t forget to Like Us on Facebook and do follow us on Twitter for latest updates.

Share this Article


Geeks who read this article also read…



Follow @MyTechMantra on Twitter
We're on Facebook
Bookmark and Share

"Receive newsletters and special offers about SQL Server, BizTalk and SharePoint from MyTechMantra. We respect your privacy and you can unsubscribe at any time."