Is Windows able to run Disk Optimize with SQL Server running?

I've just inherried a SQL Server, where the database file growth was set to 1MB. So there are a lot of databases (>25) that have grown in small increments until now (currently totalling 300 GB).

So I thought the hard disk must be really fragmented, and ordered lots of downtime to run Disk Optimize (having shut down SQL Server). But it finished in 1 minute, saying the disks were not fragmented.

I noticed that it has been set with Scheduled optimization = On.

Is Windows 2016 able to run Disk Optimize with SQL Server running?

I've been searching high and low and all places say you should manually grow your databases in big chunks to avoid fragmentation. This seems less important if you can accept that Windows runs Disk Optimize once a week. The SP_Blitz tool from Brent Ozar puts out a warning if you have 1MB growth size.

1
задан 18 April 2018 в 12:19
1 ответ

Каждый раз, поскольку в Windows была эта функция, она фактически работала с заблокированными файлами. Даже до того, как тот, который они купили (я думаю), позволил это. В ядре есть специальный API, позволяющий перемещать файлы без обычного API файловой системы.

Итак, ответ - да.

1
ответ дан 3 December 2019 в 23:17

Теги

Похожие вопросы