microsoft / tigertoolbox

Toolbox repository for Tiger team
http://aka.ms/sqlserverteam
Other
1.45k stars 734 forks source link

Running AdaptiveIndexDefrag on AWS RDS SQL Server #279

Open JoshuaKongTH opened 2 years ago

JoshuaKongTH commented 2 years ago

First of all, thank you so very much for this wonderful utility. I just want to share my experience.

I downloaded and installed the script in one of our test AWS RDS SQL Server (Microsoft SQL Server 2016 (SP3) (KB5003279) - 13.0.6300.2 (X64) ); and when I ran it, it gives me an error "The SELECT permission was denied on the object 'dm_db_stats_properties_internal"

The user ID I used to execute the stored proc have db_owner role and does not have "deny" role selected.

After some online research and discussion with colleague, I modified the stored proc and replace "dm_db_stats_properties_internal" with "dm_db_stats_properties".

And voila it worked.

maybe this specific version of AWS RDS does not support dm_db_stats_properties_internal? not sure. but thought I would share here, if it might help others or someone can actually shed some light. thanks.