Is there a chance of database corruption if I cancel the index reorganization task?

In the scheduled maintenance window, I manually rebuilt / reorganized some of the SQL Server 2012 database indexes. This was an offline task as my SQL Server license does not allow online rebuild / reorganization.

So, I have a fairly large table with 10,000,000 rows. It had 14% fragmentation and I used MS SQL Server Management Studio to reorganize the indexes.

My problem is that the reorganization operation took 10 minutes (green marks and Succeeded sign), but the Management Studio window is still not closed. I wait like 3 hours and nothing else. The dope spinning wheel is still rotating.

What should I do now? Is the force closing the window? Dock Management Studio window? I am worried because Activity Monitor shows that there is still the requested query in tempdb and I am afraid to corrupt the table.

How do I find the current task? My goal is to find if it is safe or not to forcefully close the Management Studio working base.

Note. I have tested the same operation on another computer with a recent backup and the same CPU / RAM. It took only 15 minutes to complete the job.

Any advice is appreciated.

+3


source to share


2 answers


Index reorganization is always online. Also, index reorganization works internally in small batches, often fixing. It can be interrupted at any time, and the next run will resume from the point where it was last (Strictly speaking, it will resume from the beginning, but the actual work will resume from the point where it was stopped, without any intermediate changes). There is not much lag behind interrupt rollback. Once again, this is only true about REORGANIZE

.

Now, I cannot help you with blocking SSMS and you have probably already made a decision. But I'm saying that the sooner you learn to avoid using the built-in visual tools from Management Studio, the better your life will be. Run T-SQL commands.



Additionally, many people recommend using Ola Hallengren's index maintenance scripts.

+1


source


No, but the index may be damaged. If so, you can delete it and restore it.



0


source







All Articles