Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating multiple indexes on a table in SQL Server. The script is still executing but all the required indexes are showing as objects in Object Explorer. Do the objects get created before the index creation has been completed or once the index has been created succesfully?


migration rejected from Oct 6 '13 at 14:26

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as unclear what you're asking by Kin, Paul White, Mat, Mark Storey-Smith, Jon Seigel Oct 6 '13 at 14:26

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

I can't recreate this behavior, is it all indexes that are showing, or is it the ones created first that are showing before the entire script has finished executing? – GarethD Sep 25 '13 at 9:30
It looks like all indexes. The script has finished executing now and all the indexes have been created. It was just a matter of interest, so that I can check the progress of a script in the future. – David Sep 25 '13 at 9:41

When you're restoring a database, it appears in the database list in Object Explorer before it's finished restoring, so it could conceivably be the same for indices.

If it's an indication of progress you're after, then placing a PRINT statement before your CREATE INDEX statement, and putting them all in different batches with the GO keyword will cause messages to be printed to the Messages tab in SSMS as your indices are created.