SQL to shrink log file on SQL Server

SQL to shrink down the log file on SQL Server (2000)

use MyDatabase


BACKUP LOG MyDatabase WITH TRUNCATE_ONLY


DBCC SHRINKFILE(MyDatabase_log, 2)


where MyDatabase_log is the logical name of the log file for your database.

Comments