Is there any way to force DBCC SHRINKFILE to use more than one core? We're running SQL Server 2014 on a hex core machine - and SHRINKFILE is using one hyper threaded core. I/O is at a small fraction of capacity, and WAIT_TYPE is persistently 'SOS_SCHEDULER_YIELD'. Our database is 1TB so this is going to take days currently.

I've seen mentions of using index rebuilds or moving table to a different file group - but is there any way to do this without having to (a) actually move everything to a different file group (as opposed to just other files within the file group) or failing that (b) having to do this manually for every table in the db?

  • 1
    Nope - Shrinkfile is single threaded. – Sean Gallardy Apr 12 '15 at 14:48
  • Are you sure that the database is not going to grow again ? shrinking a database will cause large fragmentation. What issue are you trying to address ? – Kin Shah Apr 12 '15 at 18:11
  • @kin we redefined a unique clustered index on a very large table - the database is now 1TB in size with 50% of that in use – James Crowley Apr 12 '15 at 20:14
  • @SeanGallardy - is there a reference for that fact? – Max Vernon Jun 6 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.