How To Shrink Transaction Log in MSSQL 2000
Suppose our MSSQL 2000 database transaction log has grown very big so we need to cut it manually during maintenance in order to save some disk space. Here are the steps to truncate database transaction log (the example uses Pubs sample database and truncates it to 100 Mb):
DBCC SHRINKFILE(Pubs_log, 100)
BACKUP log Pubs WITH TRUNCATE_ONLY
DBCC SHRINKFILE(Pubs_log, 100)
Transaction log will be truncated to the desired size.
Update: WITH TRUNCATE_ONLY is deprecated in MSSQL 2005.
Sunday, January 18, 2004 3:43 AM