November 13, 2014 at 6:55 am
Hi Experts,
We have created a job which creates Clustered as well as non clustered indexes on a table.
I was requested to let the client know the status of the job. The table size is 1 TB.
I wanted to check what exactly is going on for the particular SPID.
I could see in sys.dm_exec_sql_text that the following insert command was running:
insert into <table> select * from <table>
Could you please let me what part of Create Index is this?
Version: SQL Server 2008 R2
Thanks,
Dev
November 13, 2014 at 7:34 am
That's the actual creation of the index. I believe the percent_complete column in sys.dm_exec_requests is updated for CREATE INDEX so you can monitor it using that. I use Adam Machanic's sp_WhoIsActive which displays it.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
November 14, 2014 at 3:17 am
Hi Jack,
Thanks for your reply. percent_complete in sys.dm_exec_requests does not show for CREATE INDEX. The job got completed.
I took a different approach to monitor. I checked sp_helpindex to check how many indexes got created.
But I am still wondering what that Insert command was doing while creating indexes.
Thanks,
Dev
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply