SQL LOADER (sqlldr)

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
UPS
Premium Member
Premium Member
Posts: 56
Joined: Tue Oct 10, 2006 12:18 pm
Location: New Jersey

SQL LOADER (sqlldr)

Post by UPS »

How can I set up SQL loader (sqlldr) within DataStage? We have sequential files that will need to be loaded to our Orable database table. Also, is it possible to sql load a dataset, or the file has to be a sequential file?

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

Post by ray.wurlod »

sqlldr is an Oracle utility. You set up the Oracle utility on the DataStage server machine, but not "within" DataStage.

DataStage can invoke sqlldr through its command line or via the ORAOCIBL or ORABULK stage types.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
UPS
Premium Member
Premium Member
Posts: 56
Joined: Tue Oct 10, 2006 12:18 pm
Location: New Jersey

Using ORABULK stage

Post by UPS »

In the ORABULK stage, I created the datafile and the controlfile and the rest of the properties (properties tab), what goes to the input fields in the General tab that are required? Where exactly is the database connection done? Is it on the server side or can it be done in the ORABULK stage?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The ORABULK stage is old and really was meant only for Oracle 7 databases.

Stick with the ORAOCIBL a.k.a. the 'Oracle OCI Load' stage. There you have a choice of Automatic versus Manual mode. The former is 'bulk loading on the fly' and the latter creates the files you are expecting and you must then 'manually' issue the sqlldr command after it completes.
-craig

"You can never have too many knives" -- Logan Nine Fingers
UPS
Premium Member
Premium Member
Posts: 56
Joined: Tue Oct 10, 2006 12:18 pm
Location: New Jersey

Difference Between "Oracle 7 Load" and "Oracl

Post by UPS »

Thank you!

Is that one of the main differences between the two ("Oracle 7 Load" and "Oracle OCI Load")? So for the ORAOCIBL, will I need another stage to run the sqlldr (like Wrapped stage) if the Load Mode is set to "Manual"? What are the pros and cons of using the "Automatic" or using "Manual" for the Load Mode?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Automatic means that sqlldr is kicked off straight away.

Manual means that sqlldr is not kicked off straight away. This can be useful where, for example, your time windows for extraction and loading do not coincide. You can still completely preserve control within DataStage - use an Execute Command activity in a job sequence to initiate sqlldr at the appropriate time.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
UPS
Premium Member
Premium Member
Posts: 56
Joined: Tue Oct 10, 2006 12:18 pm
Location: New Jersey

Directory Path?

Post by UPS »

"ORAOCIBL_TEST..Oracle_OCI_Load_0: Internal Error: Unable to initialize the Direct Path Context
ORA-00942: table or view does not exist"

I am receiving the above message. What is exactly the "Direct Path Context?" Is this the connection to the database? the Directory Path field - this is the actual local path where the sql loader can be generated, correct?

Please advise. Thank you.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Don't worry about the 'Direct Path Context' part - this is your issue:

ORA-00942: table or view does not exist

Verify your table and schema names in the stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply