I performed dbcc sqlperf(logspace) and saw the logspace usage of some database are above 90%.
What will happen if it reaches 100%? What should I do to lessen the logspace usage of my database?
I performed dbcc sqlperf(logspace) and saw the logspace usage of some database are above 90%.
What will happen if it reaches 100%? What should I do to lessen the logspace usage of my database?
What will happen if it reaches 100%?
If the FILEGROWTH
option is set then it will kepp on growing by that setting rate. Also the recovery model
determines what happens to Transaction Log entries from before the checkpoints.
In simple Mode
, they are deleted when a checkpoint occurs but all transaction data is lost and can't be reviewed back. In the other recovery models, the Transaction Log entries are not deleted until a full backup.
You can as well shrink the log size by using DBCC SHRINKFILE
. To reduce the physical size of a physical log file, you must shrink the log file. This is useful if you know that a transaction log file contains unused space that you will not be needing.
DBCC SHRINKFILE('dbname_log', 1);
To reduce the physical size of the file you may will have to compress the file. see MSDN Documentation for more information on the same.
You also really want to see Aaron Bertrand answer on this post How do you clear the SQL Server transaction log?