How to free Transaction log space in SQL SERVER 2005:
I have Transaction log size = 70 GB and there four transaction logs 1,2,3,4 in different drives. Through DBCC SQLPERF(LOGSPACE) I found that the transaction log is Full (uses 100 %) and I want to free up the space in transaction log and I don't want T-log backup. I don't have space to backup the transaction log. And my DB is in Replication state.
Perform the following sequence of statements:
BACKUP LOG <db_name> WITH TRUNCATE_ONLY
--or save to log to other drives on disk if required
GO
CHECKPOINT
GO
--replace 2 with your actual log file number.
DBCC SHRINKFILE (2, 100)
If the log does not shrink then check the reason of log file growth. More information about this can be found here:
http://sqlreality.com/blog/ms-sql-server-2008/troubleshooting-the-full-transaction-log-problem/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With