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?
-
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.
From Richard -
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
From Massimo -
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
From Aaron Alton
0 comments:
Post a Comment