SQL SERVER – Fix – Error – Property MemoryAllocatedToMemory OptimizedObjectsInKB is not available for Database. This property may not exist for this object, or may not be retrievable due to insufficient access rights.

The other day when I was presenting my popular training SQL Server Performance Tuning Practical Workshop, during the demonstrations, I received following error. It was bit embarrassing for me as I was presenting in front of over 25 extremely smart DBAs and the error MemoryAllocatedToMemory OptimizedObjectsInKB showed up on the screen.

The error is visible on the screen over when you right click in SQL Server Management Studio and click on properties.

Property MemoryAllocatedToMemoryOptimizedObjectsInKB is not available for Database ‘[YourDBName]’. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (SqlManagerUI)

Here is the image of the error as well.

Error dialog box.

Fortunately, I knew the solution of this problem.

Solution/Workaround:

The issue is a permissions issue. You can quickly resolve this issue by running following command in your query window.

USE YourDBName
GO
sp_changedbowner 'sa'
GO

As soon as you run above command the error will disappear and you will be able to check properties again for your database. I suggest that afterward, you change your database access to your preferred user.

If you are based out of European country, GDPR is very important for your database. You can read this article where I have discussed GDPR and SQL Server. SQL SERVER – How to Make SQL Server GDPR Compliance?

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.

SQL Error Messages, SQL Memory, SQL Server, SQL Server Management Studio, SQL Server Security
Previous Post
SQL SERVER – Unable to Repair – SQL_Telemetry_Repair_Startup_Cpu64 gives error – The Service Cannot Be Started
Next Post
SQL SERVER – What is Change Pending State of in SQL Server Configuration Manager?

Related Posts

1 Comment. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.