question

VijayKumar768 avatar image
0 Votes"
VijayKumar768 asked Mike-Ubezzi commented

Automating Azure SQL Database index maintenance

Hi,

I am planning to implement Automating index maintenance on Azure SQL Database.

What is the best approach and ways to implement?

there are 10 DB's.

azure-sql-databaseazure-automation
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, @VijayKumar768 - I wanted to follow up with you to see if you have any additional questions or if the solution I provided as an answer is useful to you? Another option is to use the automatic tuning feature. Please see: Automatic tuning in Azure SQL Database and Azure SQL Managed Instance

Automatic tuning is a fully managed intelligent performance service that uses built-in intelligence to continuously monitor queries executed on a database, and it automatically improves their performance. This is achieved through dynamically adapting database to the changing workloads and applying tuning recommendations. Automatic tuning learns horizontally from all databases on Azure through AI and it dynamically improves its tuning actions. The longer a database runs with automatic tuning on, the better it performs.

The first option I mentioned gives you more control.

Regards,
Mike

0 Votes 0 ·

1 Answer

Mike-Ubezzi avatar image
0 Votes"
Mike-Ubezzi answered VijayKumar768 edited

Hi, @VijayKumar768 - Please take a look at the following TechCommunity blog specific to your ask: Automating Azure SQL DB index and statistics maintenance using Azure Automation

The general steps are the following where the blog has the detailed steps:

  1. Azure automation account

  2. Import SQLServer module

  3. Add Credentials to access SQL DB

  4. Add a runbook to run the maintenance

  5. Schedule task

Please let the forum know if you have any additional questions or need assistance deploying solution detailed in the document.






· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Mike,


I have successfully created.

Here are the few quesitons?

  1. Can use same runbook for another SQL DB (like sharing runbook)? instead of creating new runbook
    --> My plan is to implement same index mainteance plan for another 3 SQL Db's.

  2. How to create alert if jobs fails?


0 Votes 0 ·