Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Feb 5 '11 at 15:39

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

up vote 4 down vote accepted

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.

share|improve this answer
    
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 '11 at 19:39
    
@O.D - What is your recovery model set at? –  Randy Minder Feb 4 '11 at 19:40
    
Voll, which i changed now to simple. –  O.D Feb 4 '11 at 19:44
    
'Voll' as in German for 'Full' ? –  Remus Rusanu Feb 4 '11 at 19:51
    
BAD bad advice, he may need full recovery. –  HLGEM Feb 4 '11 at 20:08
show 1 more comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.