hi try this - FrontOff is database name
Use FrontOff
DBCC SHRINKDATABASE ('FrontOff')
Declare @sLogName as varchar(50)
Declare @sSQL as varchar(500)
select top 1 @sLogName = [name] from sysfiles
Where [groupid] = 0
BACKUP LOG FrontOff WITH TRUNCATE_ONLY
Print @sLogName
set @sLogName = rtrim(ltrim(@sLogName))
DBCC SHRINKFILE( @sLogName , 2)