What happens when CREATE INDEX gets interrupted (manually or accidentally)?
-
It takes hours or even days to create an index for a table of millions of rows. What happens to the database / data when CREATE INDEX gets interrupted? Such as when I manually used Ctrl-C or when there's an accident like a power-failure. Does it do harm to the database / data? If so, how do we recover from such an interruption?
-
Answer:
Index creation is done within a transaction. If you interrupt it, SQL Server will rollback the transaction. This might take a while, but it's harmless. Of course, there are locks held while the transaction is active so this can impact your server's performance. If you lose power in the middle, SQL Server will automatically rollback the partially completed transaction when the server boots. Again, there's a performance hit but there's no harm done to your data. http://technet.microsoft.com/en-us/library/ms188317(v=sql.105).aspx http://technet.microsoft.com/en-us/library/ms190925.aspx http://technet.microsoft.com/en-us/library/aa224747(v=sql.80).aspx
kavoir.com at Database Administrators Visit the source
Related Q & A:
- What happens when you report someone as spam on your messenger?Best solution by Yahoo! Answers
- What happens when your computer crashes?Best solution by Yahoo! Answers
- What are the yahoo points for? And what happens when I run out of them?Best solution by Yahoo! Answers
- What happens when you block someone on MSN?Best solution by Yahoo! Answers
- What happens when an amnesiac gets their memory back?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.