Oracle Insert error

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
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Oracle Insert error

Post by neena »

I am getting the following database error . It is a simple auto generated sql query for upset. This job has been succesfully running before but has been failing from last week onwards. Is there any perticular reason this might happen to an existing job???

My other concern is for some reason I dought that the orchestrate values are not being passed to the Oracle stage, if this is true is there any solution to this problem.

Oracle_Enterprise_81,1: Array execute failed for insert:
insert is: INSERT
INTO
FILE_VENUE
(FILE_CONTROL_ID, TIME_ID, VENUE_ID, STATUS_CD, RECORD_CNT)
VALUES
( :FILE_CONTROL_ID, :TIME_ID, :VENUE_ID, :STATUS_CD, :RECORD_CNT)
sqlcode is: -2291
esql complaint: ORA-02291: integrity constraint (USA.FK_FILE_VENUE_FILE_CONTROL) violated - parent key not found
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

ORA-02291 error relates to RI. A foreign key doesn'nt exist for the natural key that you are trying to add. Its not a datastage error but a database error and rightfully so. The database as active RI and hence not allowing you to insert the value.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Insert the data in the table where the primary key (Parent table) first and later try this job.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Re: Oracle Insert error

Post by neena »

This job is working fine with the datastage version- 7.5.1X and is not working in the 7.5.1A version of datastage, both these versions are using the same database. I have checked the parent table and the key column exists in the parent table.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

The error obtained is seems to be not much relevent to versions. Still try to insert the same set of records from command prompt (direct load).
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Re: Oracle Insert error

Post by neena »

Yes we did that and working fine.
Post Reply