Find solution

What happens when CREATE INDEX gets interrupted (manually or accidentally?

Check our answers to ‘What happens when CREATE INDEX gets interrupted (manually or accidentally?’ - we found 90 replies and comments relevant to this matter. The best answers are submitted by users of Database Administrators, Quora and Yahoo! Answers.

Best solution

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

    Mark as irrelevant Undo

Other solutions