The Problem Solver

Tell me and I will forget
Show me and I will remember
Involve me and I will understand
- Confucius -

Google Ads

This Blog

Syndication

Search

Tags

News





  • View Maurice De Beijer's profile on LinkedIn

Community

Email Notifications

Explore

Archives

SQL Server tip

Just a quick tip for when developing with SQL Server.

When doing a lot of updates in SQL the transaction log might grow quite large clogging up the disk and slowing things down. An easy and quick way to cleanup is to use:

backup log <<Database name>> with truncate_only
go
dbcc shrinkdatabase ( <<Database name>> )
go

 Use the sp_databases stored procedure to see which database is getting big.

 

Warning: Keep in mind that the truncate_only option just dumps the transaction log so you do not want to do this on a production machine! But on a development machine where a database is just a test item it is a quick way to retrieve some disk space.
 

Enjoy! 

Published Tue, Sep 4 2007 14:45 by Maurice
Filed under: , ,