IDatabaseOptions.AutoShrink Property
Gets or sets a Boolean property value that specifies whether the AUTOSHRINK database option is active. This property is not CLS-compliant.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Deklaracja
<DisplayNameKeyAttribute("Database_AutoShrinkName")> _
<DisplayDescriptionKeyAttribute("Database_AutoShrinkDesc")> _
Property AutoShrink As Boolean
[DisplayNameKeyAttribute("Database_AutoShrinkName")]
[DisplayDescriptionKeyAttribute("Database_AutoShrinkDesc")]
bool AutoShrink { get; set; }
[DisplayNameKeyAttribute(L"Database_AutoShrinkName")]
[DisplayDescriptionKeyAttribute(L"Database_AutoShrinkDesc")]
property bool AutoShrink {
bool get ();
void set (bool value);
}
/** @property */
boolean get_AutoShrink ()
/** @property */
void set_AutoShrink (boolean value)
function get AutoShrink () : boolean
function set AutoShrink (value : boolean)
Property Value
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.
Remarks
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.
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
See Also