Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
SSIS - Using Dataflow task to insert records,...
SSIS - Using Dataflow task to insert records, but the log is growing and eating up all disk space
Rate Topic
Display Mode
Topic Options
Author
Message
tan110
tan110
Posted Tuesday, November 27, 2012 1:14 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Tuesday, April 16, 2013 6:54 AM
Points: 146,
Visits: 611
SSIS - Using Dataflow task to insert records 47 mill records from a SQL Server 2008 r2 db to a destination SQL Server 2008 r2 db, but the log is growing and eating up all disk space, causing the package to fail. The database is in simple mode. There are approximately 47 million records that needs to be moved. I set the "Maximum Insert Commit Size" to 5 mill. I thought that would keep that log under control, but the package keeps failing due to the log growing out of control. Please help. Any suggestions.
Post #1389392
Evil Kraig F
Evil Kraig F
Posted Wednesday, November 28, 2012 12:13 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 1:13 PM
Points: 5,660,
Visits: 6,101
tan110 (11/27/2012)
SSIS - Using Dataflow task to insert records 47 mill records from a SQL Server 2008 r2 db to a destination SQL Server 2008 r2 db, but the log is growing and eating up all disk space, causing the package to fail. The database is in simple mode. There are approximately 47 million records that needs to be moved. I set the "Maximum Insert Commit Size" to 5 mill. I thought that would keep that log under control, but the package keeps failing due to the log growing out of control. Please help. Any suggestions.
What you need are minimally logged inserts, and you can't use a smaller commit size for them, because then the next 'section' won't minimally log. However, 47 million records can be huge depending on row width.
More information on Minimal Logging prerequisites:
http://msdn.microsoft.com/en-us/library/ms190422(v=sql.105).aspx
Now, commit size is equivalent to BATCHSIZE from BULK INSERT. Now, from the BULK INSERT page:
http://msdn.microsoft.com/en-us/library/ms188365.aspx
The BULK INSERT statement can be executed within a user-defined transaction to import data into a table or view. Optionally, to use multiple matches for bulk importing data, a transaction can specify the BATCHSIZE clause in the BULK INSERT statement.
If a multiple-batch transaction is rolled back, every batch that the transaction has sent to SQL Server is rolled back.
This means that you're not saving any T-Log space because it's not multiple transactions, it's merely multiple batches in the same transaction. So, that's not going to help with the problem.
Is there some kind of Identity field on the originating data that you could create a WHERE loop for the inbound data and grab it in 5 million row chunks, allowing for checkpoints to be sent to the database after each chunk? If not, try the minimally logged route and see where it can take you.
- Craig Farrell
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions
|
Forum Netiquette
For index/tuning help, follow these directions.
|
Tally Tables
Twitter: @AnyWayDBA
Post #1390049
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.