For whatever reason, though, your logs are growing and you need to cut them down to size. (Perhaps jobs were failing due to running out of space, or for whatever other reason)
First, it's usually a good idea to make sure that a current good backup of the db your dealing with has been made -- after all, recovery is usually why we rely on transaction logs.
Once the db is backed up, you can:
- execute "BACKUP LOG databaseName
/db>WITH TRUNCATE_ONLY" using Enterprise Manager or Query Analyzer - to recover the space that this will free, you then either:
- run "DBCC SHRINKFILE (filename
/db_log_>, size /size>)" where /db_log_file>is the filename without the ldf extension, and size /size>is the target size for the file - use the shrink database functionality through Enterprise Manager (right click the db name -> All Tasks -> Shrink Database... -> Click "Files" button, and select the logfile from the dropdown, select the desired "Shrink action" and click "Ok" -> A dialog box should pop up when the shrinking has completed -> Clear the dialog box and cancel out of the "Shrink Database" window, otherwise you may shrink more than you'd bargained for)