IDatabaseOptions.AutoShrink Property
SQL Server 2012
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)
[DisplayNameKeyAttribute("Database_AutoShrinkName")] [DisplayDescriptionKeyAttribute("Database_AutoShrinkDesc")] bool AutoShrink { get; set; }
Property Value
Type: System.BooleanA 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)).
