title: How to query the progress or estimation of Index Rebuild
body: <p>I get SQL Server 2016 (SP2-CU2) and partition table (2 TB space, like 10 billion records, avarage 250M records per one partiton month) with non-unique and non-clustered index and run enable (rebuild) with typical command:</p>
  <pre><code>ALTER INDEX [IX_name_Partition] ON [dbo].[TBL_name_Partition] REBUILD PARTITION = ALL
  WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, 
  ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) 
  GO
  </code></pre>
  <p>It's running for 12 hours and who knows how long it can run at all.
  Any ideas how to get an estimate/progress for its operation?</p>
  <p>The most popular threads related it topics (scripts that I tried but unfortunately it doesn't help at all):</p>
  <ul>
  <li><a href="https://docs.microsoft.com/en-us/answers/questions/94444/how-to-query-the-progress-of-sql-reindex.html" rel="nofollow noreferrer">How to query the progress of SQL Reindex</a></li>
  <li><a href="https://dba.stackexchange.com/questions/76375/check-progress-of-alter-index-reorganize-rebuild/76379">Check progress of alter index reorganize / rebuild</a></li>
  </ul>
  <p><strong>UPD!</strong> P.S. After 19 hours this rebuild was completed successfully.</p>