Helo guyi have SQL 2008 R2.
My database is about 25GB, Recovery Model is Full, and the Log File is set to a Initial Size of 1GB and the Autogrowth By 1000MB to a restricted growth 2097152MB.
In a couple of hours the Log (as the Initial Size) is 4GB. Can you tell me why?
How can i prevent this quick growth?
Thanks for your help
Comments
check over the Internet and it seems that my problem is not having a Transaction Log Backup.
Dont confuse truncating the log with shrinking the log.
To TRUNCATE is to remove the transactions in the log that are before the last checkpoint, (the checkpoint being when transactions are flushed to the database itself). This is done using the BACKUP command.
To SHRINK the log is to reduce the actual log file size. This is done using DBCC commands.
I recommend this 2 sources:
http://www.sqlskills.com/blogs/paul/why-is-log_reuse_wait_desc-saying-log_backup-after-doing-a-log-backup/
http://technet.microsoft.com/en-us/magazine/2009.02.logging.aspx
I have search also here on Mibuso and i found this:
With this command, you can check WHY SQL Server cannot free the transaction log:
SELECT name,log_reuse_wait_desc
FROM sys.databases
WHERE log_reuse_wait_desc <> 'NOTHING'; -- nothing means Nothing is blocking the reusing of transaction log space.
With this command, you can see how many virtual log files there are in your DB (you need to run it using the db you want to check):
DBCC LOGINFO;
http://mibuso.com/forum/viewtopic.php?f=33&t=59880&hilit=logs
During the day I have create a Task to do a Transaction Log Backup every single hour.
We have a Maintenance Plan overnight that does a:
Backup Database Task
Transaction Log Backup
Maintenance Database Files (1Day)
Maintenance Log Files (1Day)
Check Database Integrity Task
Reorganize Index Task
History Cleanup
I believe it's the task Reorganize Index Task that is increasing the log files.
This morning I have put the TLog initial size to 15GB (growth: 500MB)
What are your thoughts, about this?
This with "truncate" the log file. It will not shrink it.