If the transaction log of a certain database is using too much disk space on the server, you might want to revisit your transaction log backups and set them to run with a higher frequency. You can always reclaim some space with a few workarounds if you really have to… be careful with these and try to understand what you are doing before simply executing commands.
-- Find the LOG file name USE Database_Name SELECT NAME FROM Database_Name.dbo.sysfiles WHERE NAME LIKE ('%LOG%') -- Shrinks the file to its default size DBCC SHRINKFILE ('Database_Name_Log')
Check whether the Log file has reduced in Size, if not, check the log for uncommitted transactions.
-- Check open transactions DBCC OPENTRAN('Database_Name');
In case there are many transactions open, kill them and try shrinking again. If this still doesn’t works, do the following:
USE Master BACKUP LOG Database_Name WITH TRUNCATE_ONLY -- The shrink below may take a long time depending on the size of your DB DBCC SHRINKDATABASE (Database_Name)