Condividi tramite


Metodo DatabaseFile.Shrink

Shrinks a database file.

Spazio dei nomi  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Sintassi

'Dichiarazione
Public Sub Shrink ( _
    newSizeInMB As Integer, _
    shrinkType As ShrinkMethod _
)
'Utilizzo
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
)

Parametri

  • newSizeInMB
    Tipo: System.Int32
    An Int32 value that specifies the new size of the database file.

Esempi

Utilizzo di filegroup e file per archiviare dati

Vedere anche

Riferimento

DatabaseFile Classe

Spazio dei nomi Microsoft.SqlServer.Management.Smo

Altre risorse

Architettura di file e filegroup