Database Compression Constants (SQLDMO_SHRINK_TYPE)

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

Database compression constants control the behavior of the Shrink method, optimizing method execution.

Constant

Value

Description

SQLDMOShrink_Default

0

Data in pages located at the end of the file is moved to pages earlier in the file. The specified file is truncated to reflect allocated space.

SQLDMOShrink_EmptyFile

3

All data is moved from the referenced file to other files in the same filegroup.

SQLDMOShrink_NoTruncate

1

Data in pages located at the end of the file is moved to pages earlier in the file.

SQLDMOShrink_TruncateOnly

2

Data distribution is not affected. The specified file is truncated to reflect allocated space, recovering free space at the end of any file.