共用方式為


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
)

參數