Thursday, March 29, 2012

DBCC shrinkfile

As I have discovered over several communications with you
(have been very helpful), its seems best that I have our
production database in a "Full" model recovery, with the
database file and transaction file in autogrowth mode.
Because my transaction file was extremely large I also
found out that I needed to do a "backup log" command in
order to shrink the transaction file. Another question:
Our database after a backup is 735mg and the database file
before the backup shows a size of 7Gigs. Is it necessary
to also shrink the database file. Does this mean that
there is a lot of space within the database that needs to
be cleaned out?
Thank you again,
RandyRand,
If your in Full recovery mode you need to issue a log backup on a regular
basis, not just to shrink it. And by the way backing it up does not shrink
it, that is a result of running DBCC SHRINKFILE. The backup log just
truncates the committed trans so it can be shrunk. When you say your
database is 735mg after a backup and 7Gigs before, where are you getting
these numbers?
--
Andrew J. Kelly
SQL Server MVP
"Rand Monroe" <randmo@.ix.netcom.com> wrote in message
news:042501c357c1$daf6ae10$a601280a@.phx.gbl...
> As I have discovered over several communications with you
> (have been very helpful), its seems best that I have our
> production database in a "Full" model recovery, with the
> database file and transaction file in autogrowth mode.
> Because my transaction file was extremely large I also
> found out that I needed to do a "backup log" command in
> order to shrink the transaction file. Another question:
> Our database after a backup is 735mg and the database file
> before the backup shows a size of 7Gigs. Is it necessary
> to also shrink the database file. Does this mean that
> there is a lot of space within the database that needs to
> be cleaned out?
> Thank you again,
> Randy

No comments:

Post a Comment