Wednesday, March 28, 2012

Help! Transaction log is 40GB

The database is not even 10MB, but the Transaction log is over 40GB!
The recovery model was set to Full (I have set it to simple now) and
have tried performing a full backup with the "Remove inactive entries
from transaction log" checked.
Any advice on how to make the transaction log behave? Thes steps above
were the ones I already new.Some info at 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/
"hobbzilla" <hobbzilla@.hotmail.com> wrote in message
news:1133998771.980365.222680@.g49g2000cwa.googlegroups.com...
> The database is not even 10MB, but the Transaction log is over 40GB!
> The recovery model was set to Full (I have set it to simple now) and
> have tried performing a full backup with the "Remove inactive entries
> from transaction log" checked.
> Any advice on how to make the transaction log behave? Thes steps above
> were the ones I already new.
>|||Running
DBCC SHRINKFILE(databasename_log, 2)
cleaned it up to 2MB from 40GB. Shouldn't this automatically happen
after a maintenence plan is run doing a full backup of the database?|||hobbzilla wrote:
> Running
> DBCC SHRINKFILE(databasename_log, 2)
> cleaned it up to 2MB from 40GB. Shouldn't this automatically happen
> after a maintenence plan is run doing a full backup of the database?
>
No. A full backup will only backup the file but it will preserve the
unused space. It's also the normal procedure that you don't shrink the
file unless there's a specific reason for why it has grown to that size.
If it's due to normal production, the server will just have to use
resources to grow the file again.
Regards
Steen

No comments:

Post a Comment