"Is it okay to run Ola Hallengren’s index rebuild and stats update script from a separate database instead of master, and will this impact fragmentation handling?"

N B 0 Reputation points
2025-08-26T18:17:37.55+00:00

In my organisation, we run Ola Hallengren’s index rebuild and update stats script on a separate database instead of the master database. Is this a recommended practice, and will it affect index fragmentation or reorganisation?"

SQL Server Database Engine
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alberto Morillo 34,926 Reputation points MVP Volunteer Moderator
    2025-08-26T19:51:26.39+00:00

    On Azure SQL Database, I create Ola scripts (stored procedures) on each user database and execute them in the context of each user database. Rest assured that if has no impact on defragmentation and statistics update. The results are the same. In fact, it is not good practice to create user objects on the master database.

     

    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.