Friday, February 24, 2012

Cannot Shrink Database

All,
We have a data modeling group in here that can grow databases to 150Gb or
200Gb.
When they have run a scenario they will get rid of lots of the data and ask
me to shrink the database for them. This usually works no problem.
Today I have 2 databases they want to shrink, both have 85 - 90 Gb free, but
when I shrink with a 10% free space option nothing happens to the size.
I am a bit hazy about the details but is it something to do with where data
gets written to?
Any ideas on how to get around this problem would be very welcome.
Thanks In AdvanceVerify that the tranlog has been backed up recently and then run
CHECKPOINT against the database. This will force all of the dirty and
log pages that haven't been written to get written. Most likely there
is a dirty page preventing the database from shrinking any further than
it has.
HTH
Jason|||Is if the ldf file which is big? If so, I have some info in below article (approx middle of article)
regarding shrinking of tlog files:
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"MANCPOLYMAN" <MANCPOLYMAN@.discussions.microsoft.com> wrote in message
news:DFC25D21-F281-4A2C-9C21-920500732936@.microsoft.com...
> All,
> We have a data modeling group in here that can grow databases to 150Gb or
> 200Gb.
> When they have run a scenario they will get rid of lots of the data and ask
> me to shrink the database for them. This usually works no problem.
> Today I have 2 databases they want to shrink, both have 85 - 90 Gb free, but
> when I shrink with a 10% free space option nothing happens to the size.
> I am a bit hazy about the details but is it something to do with where data
> gets written to?
> Any ideas on how to get around this problem would be very welcome.
> Thanks In Advance
>|||Jason,
Thanks for the info. Appreciate the help.
"j strate" wrote:
> Verify that the tranlog has been backed up recently and then run
> CHECKPOINT against the database. This will force all of the dirty and
> log pages that haven't been written to get written. Most likely there
> is a dirty page preventing the database from shrinking any further than
> it has.
> HTH
> Jason
>

No comments:

Post a Comment