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)

[SfcPropertyAttribute]
public bool AutoShrink { get; set; }

Property Value

Type: System.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 the sp_dboption (Transact-SQL) autoshrink option in Transact-SQL.

Community Additions

ADD
Show:
© 2014 Microsoft