microsoft / tigertoolbox

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

Guidance on running `3_job_AdaptiveIndexDefrag` on Azure SQL #298

Open evilpilaf opened 1 year ago

evilpilaf commented 1 year ago

Trying to understand how to run 3_job_AdaptiveIndexDefrag.sql in an AzureSQL database is unclear, the only guidance in the scripts is on the usp_AdaptiveIndexDefrag.sql and it just says:

-- If you are using AdaptiveIndexDefrag together with the maintenance plans in http://blogs.msdn.com/b/blogdoezequiel/archive/2012/09/18/about-maintenance-plans-grooming-sql-server.aspx -- please note that the job that runs AdaptiveIndexDefrag is expecting msdb. As such, change the database context accordingly.

But what is the context? what about the tables that don't exist in AzureSQL? tables and views like dbo.sysjobs don't exist so how are jobs managed and created?