To shrink a log file,
you should call sp_dboption
before using DBCC shrinkfile
(see the script below)
It's usually enough.
/*
shrink a log file
WARNING: change the database name and the logical name of the log file (found in sysfiles).
database: MyDB
log file: MyDB_Log
*/
USE master
go
EXEC sp_dboption 'MyDB', 'trunc. log on chkpt.', 'TRUE'
USE MyDB
go
DBCC SHRINKFILE ('MyDB_Log', TRUNCATEONLY )
USE master
go
EXEC sp_dboption 'MyDB', 'trunc. log on chkpt.', 'FALSE'
USE MyDB