Méthode DatabaseFile.Shrink

Shrinks a database file.

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
Public Sub Shrink ( _
    newSizeInMB As Integer, _
    shrinkType As ShrinkMethod _
)
'Utilisation
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
)

Paramètres

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

Exemples

Utilisation de fichiers ou de groupes de fichiers pour stocker des données

Voir aussi

Référence

DatabaseFile Classe

Espace de noms Microsoft.SqlServer.Management.Smo

Autres ressources

Architecture des fichiers et des groupes de fichiers