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've written a small app to periodically query, sanitize, and insert a legacy database's data into SqlServer. There are about 3M records and, if I make the polling widow pretty small, I can imagine the transaction log getting pretty big. How can I minimize its growth during these "copy" operations?

share|improve this question

3 Answers 3

up vote 8 down vote accepted

How are you inserting data?

Bulk-logged recovery model can be your friend here.

http://msdn.microsoft.com/en-us/library/aa173529%28SQL.80%29.aspx

share|improve this answer

Massimo is right. Specifically, you want to read this article - it lists the prerequisites for bulk logging to take place:

http://msdn.microsoft.com/en-us/library/ms190422.aspx

share|improve this answer

Depends on the backup mode of the target database.

If simple, the transaction log space should be freed and reused as transactions are committed, limiting space used.

Otherwise you will need to perform transaction log back ups.

share|improve this answer

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.