Hello
Maybe a stupid question :? , but anyway:
How can I make sure the transaction log does not grow too much?
Background: We have a navision db, SQL Server 2005, log type=full, the db and the log are backed up daily by a maintenance plan. In Mgt-Studio 2005, "DB Properties", "General", "Backup ,"Last Log File Backup" it shows the date of the last backup which is correctly. The Backups of the logs are in the backup directory which is correct. I know that the size of the log file can be limited by properties of the db.
If I understand it right, the backup of the logfile does not shrink the file, but clears the inactive part of the log. However, the log is quite big now, about 4GB, the db itself is about 1.25GB. Could there be something else wrong? Otherwise I'll check in the next time wheter the log is still growing or not.
Thanks in advance
Thomas
0
Comments
To keep a log file from growing, schedule the transaction log backups more often.
Go to the Start menu, and browse to the SQL Server group. For SQL Server 2000 it's right there, for 2005 it is in the documentation submenu, for 2008 I'm not sure (that VPC is not running at the moment)
RIS Plus, LLC
When do you make a full backup and when (how often) you make a Translog Backup?
Also as Daniel said, read also the books online (F1). Also a book (paper form) is a good christmast present.
Regards
The growth/usuage of the TLog depends on the number of transactions you processed, the Recovery Model and the frequency of (TLog-)backups.
You can control the physical file-size of the TLog by adjusting the "Auto Growth" of that file, maybe to 100MB or something (instead of default 10%).
Several maintenance tasks - like REBUILDING or REORGANIZING INDEXES - will cause heavy load on the TLog; it is not unusual that after re-indexing the TLog size is larger than the database itself.
If you want to shrink the physical file size you should look into the DBCC SHRINKFILE command.
Merry Christmas ,
Jörg
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Is there a possiblitiy to see how much of the physical log file is active? If I get it rigth the active part must be almost zero % right after the backup of the log assuming there are no other transactions.
Thomas
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
In SQL Server 2005 this is the 'Disk Usage' reports under standard reports for each database, and gives you an even nicer graph.
RIS Plus, LLC