2

I have an initial DB which I have to import very often during development, this DB is not large but it seems like the transaction log file is getting bigger and bigger, so each time I have to delete the database recreate it...

Does any body know to reduce/delete/limit this?

2 Answers 2

4

You can do a ShrinkFile but I would also suggest you take a look at your Recovery Model. In SSMS, right-click on your database and choose properties. On the left, select Options. Then, on the right, you'll see a property named Recovery Model. You might want to change this from Full (if that's what it's set at) to Simple. This will help prevent your transaction log from growing so large. But you won't get point in time transaction log restores if you do this. It's a trade-off.

6
  • but the existing file is allready 13 GB ?? and it doesnt seem to change! any way thanx for ur answer, ill delete it for now and recreate it, hope it will not get as big as befor using the simple log modus
    – O.D
    Feb 4, 2011 at 19:39
  • @O.D - What is your recovery model set at?
    – Randy Minder
    Feb 4, 2011 at 19:40
  • Voll, which i changed now to simple.
    – O.D
    Feb 4, 2011 at 19:44
  • 'Voll' as in German for 'Full' ? Feb 4, 2011 at 19:51
  • BAD bad advice, he may need full recovery.
    – HLGEM
    Feb 4, 2011 at 20:08
3

How to use the DBCC SHRINKFILE statement to shrink the transaction log file in SQL Server 2005

After dealing with the existing log file, I'd suggest reviewing the recovery model setting because it's likely set to "Full" when you might want to use "Simple" instead. See MSDN documentation for more detail.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .