DatabaseFile.Shrink 方法
Shrinks a database file.
命名空间: 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
An Int32 value that specifies the new size of the database file.
- shrinkType
类型:Microsoft.SqlServer.Management.Smo.ShrinkMethod
A ShrinkMethod object value that specifies the shrink options.
示例
请参阅
参考
Microsoft.SqlServer.Management.Smo 命名空间