次の方法で共有


IDatabaseOptions.AutoShrink プロパティ

AUTOSHRINK データベース オプションがアクティブであるかどうかを示す Boolean プロパティ値を取得または設定します。

名前空間:  Microsoft.SqlServer.Management.Smo
アセンブリ:  Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)

構文

'宣言
<DisplayNameKeyAttribute("Database_AutoShrinkName")> _
<DisplayDescriptionKeyAttribute("Database_AutoShrinkDesc")> _
Property AutoShrink As Boolean 
    Get 
    Set
'使用
Dim instance As IDatabaseOptions 
Dim value As Boolean 

value = instance.AutoShrink

instance.AutoShrink = value
[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);
}
[<DisplayNameKeyAttribute("Database_AutoShrinkName")>]
[<DisplayDescriptionKeyAttribute("Database_AutoShrinkDesc")>]
abstract AutoShrink : bool with get, set
function get AutoShrink () : boolean 
function set AutoShrink (value : boolean)

プロパティ値

型: System.Boolean
AUTOSHRINK データベース オプションがアクティブであるかどうかを示す Boolean 値。True の場合、データベースは自動的に縮小されます。False (既定値) の場合、データベースは自動的に縮小されません。

説明

このプロパティは、大量の空き領域がある場合に、データベースのサイズを自動的に縮小するかどうかを示します。

AutoShrink プロパティを設定すると、ALTER DATABASE (ALTER DATABASE の SET オプション (Transact-SQL)) で AUTO_SHRINK オプションを使用したのと同じことになります。

使用例

How to Get and Set a Property in Visual Basic .NET

関連項目

参照

IDatabaseOptions インターフェイス

Microsoft.SqlServer.Management.Smo 名前空間

その他の技術情報

データベースの圧縮

プロパティの設定

データベース オプション