This should help reduce the log file size and free up space. If there are pending transactions or the log is in FULL mode, the log should be backed up before performing shrink.
DBCC SQLPERF(LOGSPACE); -- Checks the space used by the log
DBCC OPENTRAN ('mydb'); -- Checks for open transactions in the database
BACKUP LOG mydb TO DISK = 'C:\_Backup\mydb_log.bak'; -- Backs up the log (required in FULL mode)
DBCC SHRINKFILE (N'mydb_log', TRUNCATEONLY); -- Shrinks the log file, freeing up unused space
Stop backup log:
SELECT session_id, command, status, start_time FROM sys.dm_exec_requests WHERE command = ‘BACKUP DATABASE’ OR command = ‘BACKUP LOG’;
KILL sesionid;