Home
Blog
About
Database administration
Operating systems
Development
Links


Following require login:
ScratchPad



Locations of visitors to this page


Table of Contents

SQL Server DBCC

ShrinkFile

# Shrinkfile to specified size in megabytes
# if size not specified will try to shrink file to default file size
1> use tempdb
2> go
1> dbcc shrinkfile( tempdev, 10240 )
2> go
DbId	FileId	CurrentSize	MinimumSize	UsedPages	EstimatedPages
2	1	1310720	278920	120	120
(1 rows affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Other


Copyright HandyDBA 2012