You can use Ola's scripts and SQL Agent jobs to schedule maintenance of indexes and statistics for example.
How to schedule maintenance activity on Azure SQL MI instance
Hello Team,
I need to schedule regular maintenance task for SQL Managed instance ( like - reindexing, status updation, log file cleanup) etc. like what we have in our on-prem servers.
Does it has been be schedule in same way or any thing else on Managed database instance).
Any script will be helpful
Azure SQL Database
2 answers
Sort by: Most helpful
-
Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
2023-02-17T15:30:16.33+00:00 -
GeethaThatipatri-MSFT 29,542 Reputation points Microsoft Employee Moderator
2023-02-17T16:53:41.5433333+00:00 Hi, @Chetan Jain Thanks for posting your question in the Microsoft Q&A forum.
You can set up your script maintenance exactly like on SQL Server - by using SQL Agent. please refer to this document here
Note that some of those things are unnecessary for Managed Instances. Routine Reindexing is rarely necessary, updating stats is usually enough. And the log file is managed for you.
I hope this information helps.
Regards
Geetha