Total Productivity Solutions, Inc. Company Logo
TPS Home
.NET
IIS
Networking
Search Engine
SharePoint
Add URL

Shrinking the size of SQL Database transaction logs

In SQL Server 2000 (I am assuming SQL Server 2005 but I haven’t tried it there yet) the database size is not only the main database file size but also the size of the transaction log. The commands below will delete the transaction log and then shrink the size of the file to a minimal size.
To run the commands open Query Analyzer for SQL Server 2000 and enter the commands below:
DUMP TRANSACTIONS WITH NO_LOG
DBCC SHRINKFILE()
If you only run the first line be itself the transaction log will be deleted but the file side is still kept at the same size. The SHRINKFILE command will force the database to shrink the file down to the minimal size.
Home Contact Us Site Map