Export (0) Print
Expand All

DatabaseOptions.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)

function get AutoShrink () : boolean 
function set AutoShrink (value : boolean)

Property Value

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

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)).

Community Additions

Show:
© 2015 Microsoft