How to schedule maintenance activity on Azure SQL MI instance

Chetan Jain 71 Reputation points
2023-02-17T14:36:59.44+00:00

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
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2023-02-17T15:30:16.33+00:00

    You can use Ola's scripts and SQL Agent jobs to schedule maintenance of indexes and statistics for example.

    0 comments No comments

  2. 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

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.