时间:2021-07-01 10:21:17 帮助过:19人阅读
Simply...
DBCC ShrinkDatabase()
: shrink all filesDBCC ShrinkFile()
: just one fileFor example, you may have a log backup issue and it‘s grown out of control so you run DBCC ShrinkFile()
.
You almost never use ShrinkDatabase
.
Before you consider using either command, please read Paul Randal‘s blog on shrinking.
I‘d shrink neither one of the files (mdf, ldf) unless there was a clear reason. The files are the size they are because they need to be. Any blogs suggesting to do so as part of regular maintenance probably don‘t understand how SQL Server works.
What is the difference between Shrink Database and File?
标签:perl size cell HERE tween mdf clear imp stack