SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS Large records batch processing


SSIS Large records batch processing

Author
Message
ptjj
ptjj
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 18
Hi,
I have nearly 1 Crore records at my source side,i have to transfer these records to destination in batch wise let's suppose like 1 lakh records per batch.How can i implement this scenario.Pls help me.

Thank you.
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11222 Visits: 7329
In SSIS OLEDB destination component, set load type to table or view - fast load;
there will be options made available, including rows per batch and maximum insert commit size. set these to circa 10.000 to begin with and increase or decrease according to the speed required and amount of ram available.

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
ptjj
ptjj
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 18
Please suggest me to do the same with FOR Loop or FOR EACH Loop.

Thanks in Advance:-)
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11222 Visits: 7329
What is the data source (e.g. oracle, SQL server, DB2, etc)?

If SQL Server, consider using the ROW_NUMBER () function in a CTE to select e.g. 100.000 records at a time.
use variables, e.g. StartAt and UpTo (both of datatype (DT_I8)) to identify which row numbers to use.
also remember to sort.
refer to the following link: http://msdn.microsoft.com/en-us/library/ms186734.aspx

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
ptjj
ptjj
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 18
Thanks For Your Reply..
My Source Data BAse is Oracle and the Target is SQL Server.

Please help...:-)
ptjj
ptjj
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 18
How to split a Oracle Data source data into different Rawfiles with a fixed size of 10,000?On which we can split the source data of Oracle?
Pls hlp..:-)
AmolNaik
AmolNaik
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1257 Visits: 1234
But why do you need to use a For each loop? As mentioned by stewartc mentioned use batch size and commit size of 10,000 with TABLOCK option in the OLEDB Destination component, using TABLOCK option will speed up the data load operation. If you need more than 10K records to be processed increase the size to 100,000 (1 lakh).

Thanks,

Amol Naik
ptjj
ptjj
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 18
For each batch(10,000 records) i need to run a script.Sad
AmolNaik
AmolNaik
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1257 Visits: 1234
How about this then... Load all the records to a staging table with IDENTITY column. Using T-SQL Loop thru the records using IDENTITY range. This will be more efficient and easy too.

Thanks,

Amol Naik
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search