Bulk Insert in ms sql server

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Rakesh311
Participant
Posts: 36
Joined: Wed Aug 04, 2010 10:53 pm
Location: Banglore
Contact:

Bulk Insert in ms sql server

Post by Rakesh311 »

Hi

I want to insert more than 2 million of data to a SQL Server database.

The source is a flat file
Then need to do some sort of Transformation using a transformer.
Then need to load in to MS SQL database.

In datastage can anybody suggest me how to use bulk insert...please give me some detailed information.

:D

Thanks in advance
Rakesh
rAKESH
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create load-ready text file using DataStage then invoke the bulk loader (bcp) under control of DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Rakesh311
Participant
Posts: 36
Joined: Wed Aug 04, 2010 10:53 pm
Location: Banglore
Contact:

Post by Rakesh311 »

Thanks Ray for your time...


I tried it with using bulk insert option of the RDBMS stage.....

I can see am improvement in the transaction, ie records are passing at a speed of 17000row/sec.

But for committing again its takes lot of time.
I kept commit size as 10000

Thanks
Rakesh
rAKESH
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Commit is not relevant for bulk load. How have you set up the stage to communicate with the bulk loader?
Last edited by ray.wurlod on Thu Mar 10, 2011 12:02 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Rakesh311
Participant
Posts: 36
Joined: Wed Aug 04, 2010 10:53 pm
Location: Banglore
Contact:

Post by Rakesh311 »

Hi,

In Dynamic RDBMS stage in General properties of Input, we have an option called Update Action

There we have Bulk Insert and also when we select this , It shows some some other option called as BULK with some properties

There it is asking for commit size and also mention it should be greater than 0.


Thanks,
Rakesh
rAKESH
Post Reply