Search code examples
sqlsql-server-2017

How to reuse index space that was not created


My database is 34Gb in size and I created a clustered index which I believe was not successfully created due to some error and I can't find the index anywhere. During running of creation of Index, i was monitoring the hard disk size and it was decreasing while the creation of index is running. It took 10 gb space. Now, after the error in creation of index, the 10 gb space did not return. How can I get back this 10 gb of space?

Thanks!


Solution

  • Take a look at DBCC SHRINKFILE