Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Shrinks a database file.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
Public Sub Shrink ( _
newSizeInMB As Integer, _
shrinkType As ShrinkMethod _
)
'Usage
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
)
Parameters
- newSizeInMB
Type: System.Int32
An Int32 value that specifies the new size of the database file.
- shrinkType
Type: Microsoft.SqlServer.Management.Smo.ShrinkMethod
A ShrinkMethod object value that specifies the shrink options.
Examples
Using Filegroups and Files to Store Data
See Also
Reference
Microsoft.SqlServer.Management.Smo Namespace