Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DatabaseFile.Shrink Method (Int32, ShrinkMethod)


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


Type: System.Int32

An Int32 value that specifies the new size of the database file.

Type: Microsoft.SqlServer.Management.Smo.ShrinkMethod

A ShrinkMethod object value that specifies the shrink options.

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft