Step1: Taking backup from log file
BACKUP LOG myDBName WITH TRUNCATE_ONLY
Step2: Getting files logical name
EXEC sp_helpfile
it will be the first column on the list
Step3: Shrinking the database
DBCC
SHRINKFILE
(
WITH NO_INFOMSGS
Notes:
1- Using the logical name of logfile not physical when shrinking.
2- Taking backup of log file before proceed (second step).
Hope this helps,
Salam.,