Export (0) Print
Expand All

DatabaseFile.Shrink Method

Shrinks a database file.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

public void Shrink(
	int newSizeInMB,
	ShrinkMethod shrinkType
)

Parameters

newSizeInMB
Type: 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.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft