1403 Oracle Error -Upsert

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
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

1403 Oracle Error -Upsert

Post by vinaymanchinila »

Hi,

When I run a job which reads from SQL and loads into Oracle table using Oracle Ent Stage, I get the "sqlcode:1403 " error. When I take the Update stmt from the stage and execute it in Toad it works fine !

I did try to change the 'Update Else Insert' option to 'Insert else Update' but its the same error, did any one have this issue with Oracle Ent stage?


There are no date columns in my target oracle table,all the columns are char or varchar or decimal.
Thanks,
Thanks,
Vinay
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Sql Code 1403 means that the update record was not found according to the listprovided by Vincent. Is your key a char column ? What happens when you change that to varchar. There might be an issue of spaces with char field.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post by vinaymanchinila »

I had Decimal and Char as key columns and I changed it to Decimal and VarChar, still the same 1403 error and all the source rows are rejected.

Curious , if it does not find the key coulmn shouldnt the job insert the row ?

Thanks
Thanks,
Vinay
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

The stage tries to insert, if the insert fails with error code (-1), it will then try to update. The issue here is. It fails on update as well. What happens if you do only update?

Try to capture the record thats causing this error. See whats different. Does that value exist ?
For debugging purposes, replace the enterprise stage with ORA OCI stage. See if the problem persists.
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 »

Were you able to locate the record which gives out this error? Any thing special about that record?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Sathish321
Participant
Posts: 8
Joined: Tue Jan 30, 2007 11:22 pm
Location: Chennai
Contact:

Re: 1403 Oracle Error -Upsert

Post by Sathish321 »

Hey Vinay,

I had the same issue in my project also. IBM people suggested me to use DRS stage in place of Oracle entp stage. Now its working fine, U can also try with DRS stage.
Sathish321
Participant
Posts: 8
Joined: Tue Jan 30, 2007 11:22 pm
Location: Chennai
Contact:

Re: 1403 Oracle Error -Upsert

Post by Sathish321 »

Hey Vinay,

I had the same issue in my project also. IBM people suggested me to use DRS stage in place of Oracle entp stage. Now its working fine, U can also try with DRS stage.

Thanks,
Sathish
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi Sathish,
Do you have any eCase number for this?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Yea but demand for a patch. Why use DRS stage when oracle enterprise stage is there for the very same reason.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
travissolt
Participant
Posts: 51
Joined: Mon Feb 05, 2007 1:53 pm

Post by travissolt »

We have been having the same issue and I am just curious if the fixes really worked and if any issues have since deveolped. Basically the upsert logic does not seem to work correctly all the time for some of our jobs. It appears to give erroneous 1403 errors on an upsert vs insert and -1 errors on an insert vs update. The errored out data does not break any of the key contsaints so I am not sure why it does not work (if we write SQL inserts and updates we can load the data manually). You refer to a DRS stage below as opposed to an oracle entp stage. What is the DRS stage as I am not familair? Thanks
Post Reply