Export (0) Print
Expand All
Expand Minimize

IDatabaseOptions.AutoShrink Property

Gets or sets a Boolean property value that specifies whether the AUTOSHRINK database option is active.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

[DisplayDescriptionKeyAttribute("Database_AutoShrinkDesc")]
[DisplayNameKeyAttribute("Database_AutoShrinkName")]
bool AutoShrink { get; set; }

Property Value

Type: Boolean
A Boolean value that specifies whether the AUTOSHRINK database option is active. If True, the database is automatically reduced.If False (default), statistics are not automatically reduced.

This property specifies whether the size of the database is automatically reduced when a large amount of available space occurs.

Setting the AutoShrink property is equivalent to using the AUTO_SHRINK option in ALTER DATABASE (ALTER DATABASE SET Options (Transact-SQL)).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft