Oracle Loads with Trigger and Constraints enabled

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
theone
Participant
Posts: 36
Joined: Tue Oct 06, 2009 10:04 am
Location: Michigan

Oracle Loads with Trigger and Constraints enabled

Post by theone »

Is there any way to load records into non empty existing tables with constraints, triggers enabled? In this case I'm loading(Append) records into table. With no option to disabling constraints and rebuilding index.


Any help greatly appreciated.


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

Post by chulett »

Sure... just make sure you don't violate any of the constraints. What have you tried? What issues are you having?
-craig

"You can never have too many knives" -- Logan Nine Fingers
theone
Participant
Posts: 36
Joined: Tue Oct 06, 2009 10:04 am
Location: Michigan

Post by theone »

Error says : parallel load requested and XYZ has enabled triggers or constraints
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Oh, sorry... you specifically meant a direct path sqlldr type load. There's some useful information here* which may help. Oracle will disable constraints (etc) during a direct path load but PX may not like it. Was the message from DataStage or Oracle? Can you post the complete, unedited message and any others it might have logged that seem relevant?

Link didn't work with the splat in it, you'll need to cut/paste into your browser to get it to work:

http://www.orafaq.com/wiki/SQL*Loader
-craig

"You can never have too many knives" -- Logan Nine Fingers
theone
Participant
Posts: 36
Joined: Tue Oct 06, 2009 10:04 am
Location: Michigan

Post by theone »

Complete Error:

SQL*Loader-937: Parallel load requested and XYZ has enabled triggers or constraints.

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

Post by chulett »

SQL*Loader-937: parallel load requested and name has enabled triggers or constraints

Cause: A request was made for a parallel direct load, but the object to be loaded has an enabled constraint (check, referential) and/or enabled triggers.

Action: Disable the offending enabled constraints and/or triggers and retry the parallel direct load.
If you don't want to (or cannot) do that, you'll need to switch to a conventional load (DIRECT=FALSE) for that table. That basically does 'normal' inserts.
-craig

"You can never have too many knives" -- Logan Nine Fingers
theone
Participant
Posts: 36
Joined: Tue Oct 06, 2009 10:04 am
Location: Michigan

Post by theone »

Thank you for the help, to switch to a conventional load (DIRECT=FALSE) is that a datastage option or an oracle setting?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's an Oracle setting you would have DataStage provide. There's a place in the stage for 'load options' I do believe, can't check right now however.
-craig

"You can never have too many knives" -- Logan Nine Fingers
theone
Participant
Posts: 36
Joined: Tue Oct 06, 2009 10:04 am
Location: Michigan

Post by theone »

I figured it out, thank you!!!
Post Reply