Log into SQL Server Management Studio with SYSADMIN privileges and run the query.
The following example shrinks the log file in the SHIPDOCS database to 6 MB. To allow the DBCC SHRINKFILE command to shrink the file, the file is first truncated by setting the database recovery model to SIMPLE.
ALTER DATABASE SHIPDOCS SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(SHIPDOCS_Log, 6)
ALTER DATABASE SHIPDOCS SET RECOVERY FULL WITH NO_WAIT