
On creating clustered index on table in SQL SERVER 2008 (LIVE DB) got above error. Total records in table is 1046789.
I have created same index on test db with same number of records and it successfully created.
Thanks.
|
On creating clustered index on table in SQL SERVER 2008 (LIVE DB) got above error. Total records in table is 1046789. I have created same index on test db with same number of records and it successfully created. Thanks.
| ||||
|
feedback
|
|
I think your question is "what can I do to fix this?" Making that assumption:
And if that doesn't work:
| |||
|
feedback
|
|
Use following commands to find out exactly what processes are holding the exclusive locks on your table. FYI, creation of any type index must put exclusive locks on a table due to the complexity of the task. In clustered indexes the data are re-arranged physically on the disk. No access will be available on the table unless you specify the option ONLINE = OFF at index creation. Before running, REPLACE DATABASE_NAME, DB_ID, OBJ_ID and SPID with real integer values.
Identify The Spid which is holding "X" mode locks on your table. Note down ObjId and SPID values from previous query. Find out what the locking Spid is executing.
or more detailed:
Decide whether to terminate the process or commit the transaction if you know who (user) is executing.
Create the index again. | |||
|
feedback
|