AUTO_SHRINK
Periodically shrink data and log files with free space.
- デフォルト
OFF- Range
- ON, OFF
- Restart needed
- いいえ
- Default checked on
- SQL Server 2025
何ができるか
A background task shrinks files with more than 25% free space. The space is usually needed again, so files grow and shrink repeatedly, and shrinking data files fragments indexes.
デフォルト値
OFF. OFF (SQL Server 2025).
Check the current value
SELECT name, is_auto_shrink_on FROM sys.databases WHERE name = DB_NAME();
Change it
ALTER DATABASE CURRENT SET AUTO_SHRINK OFF;
No restart; takes effect immediately.
When to change it
Never turn it on. If you find it on, turn it off.
What can go wrong
Index fragmentation, repeated growth events and wasted I/O.
Questions about AUTO_SHRINK
What is the default value of AUTO_SHRINK in SQL Server?
OFF. OFF (SQL Server 2025).
Does changing AUTO_SHRINK require a restart?
No. No restart; takes effect immediately.
When should I change AUTO_SHRINK?
Never turn it on. If you find it on, turn it off.
Back to all SQL Server settings, or check the SQL Server manual for every option.
Check AUTO_SHRINK on your own server
SQLly runs the query above against SQL Server and the other engines in this reference, from one desktop app on macOS, Windows and Linux.