次の方法で共有


DatabaseFile.Shrink メソッド

データベース ファイルを圧縮します。

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

構文

'宣言
Public Sub Shrink ( _
    newSizeInMB As Integer, _
    shrinkType As ShrinkMethod _
)
'使用
Dim instance As DatabaseFile 
Dim newSizeInMB As Integer 
Dim shrinkType As ShrinkMethod

instance.Shrink(newSizeInMB, shrinkType)
public void Shrink(
    int newSizeInMB,
    ShrinkMethod shrinkType
)
public:
void Shrink(
    int newSizeInMB, 
    ShrinkMethod shrinkType
)
member Shrink : 
        newSizeInMB:int * 
        shrinkType:ShrinkMethod -> unit
public function Shrink(
    newSizeInMB : int, 
    shrinkType : ShrinkMethod
)

パラメーター

  • newSizeInMB
    型: System.Int32
    データベース ファイルの新しいサイズを示す Int32 値です。

使用例

ファイルとファイル グループを使用したデータの格納

関連項目

参照

DatabaseFile クラス

Microsoft.SqlServer.Management.Smo 名前空間

その他の技術情報

ファイルとファイル グループのアーキテクチャ