Hi. To shrink database logfiles I use this:
DECLARE @vdatafile VARCHAR(50)
DECLARE @vlogfile VARCHAR(50)
DECLARE @vdatabase VARCHAR(50)
SELECT @vdatafile = RTRIM(NAME) FROM SYSFILES WHERE GROUPID = 1
SELECT @vlogfile = RTRIM(NAME) FROM SYSFILES WHERE...