Rows are not inserting in Oracle Table

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
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Rows are not inserting in Oracle Table

Post by DSRajesh »

Dear Ray/Chullet,

Datastage job is running successfully and showing number of rows over the link in oracle db but its not inserting records in the oracle table.

source is Dataset
Intermediate stage is Transformer
Target is Oracle Table

Can you please guide me here to sort out the problem
RD
ppgoml
Participant
Posts: 58
Joined: Mon Aug 20, 2007 11:00 pm

Post by ppgoml »

it seems your records were rejected by oracle enterprise stage. you could put a reject link on oracle enterprise stage, and export the rejected records into a flat file. There would be a sqlcode column(indicating why oracle rejects your row) appended to each record,and that would be useful for you to diagnose your problem.
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Post by DSRajesh »

Hi,

Thanks for quick reply.

here i am loading the rejected records into oracle table.

i have applied condition in transformer and passing the records to reject table.

the reject link is showing the records but they are not inserting into reject table.
RD
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Post by DSRajesh »

can any please help about this error
RD
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can they be written to a text file? If so, I suspect that the user does not have INSERT privilege to this particular Oracle table.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ppgoml
Participant
Posts: 58
Joined: Mon Aug 20, 2007 11:00 pm

Post by ppgoml »

DSRajesh wrote:Hi,

Thanks for quick reply.

here i am loading the rejected records into oracle table.

i have applied condition in transformer and passing the records to reject table.

the reject link is showing the records but they are not inserting into reject table.

oracle enterprise supports the reject link, you reject link should put on oracle enterprise stage rather than transformer. and I suggest you write them to a file first.

In you situation, the most likely reason for record rejection may be that
you inserted rows into a table without INSERT privilege, or
you put a null value to a not null column(you should note that, oracle will treat whitespace string and empty string as null.), or
you had an unique index violation.
DSRajesh
Premium Member
Premium Member
Posts: 297
Joined: Mon Feb 05, 2007 10:37 pm

Post by DSRajesh »

ray,

there are the previleges for the user to insert records.

but still it is failing to insert records.
RD
Shruthi
Participant
Posts: 74
Joined: Sun Oct 05, 2008 10:59 pm
Location: Bangalore

Post by Shruthi »

I guess the log would say why the records got rejected. What is the warning shown there?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you try my suggestion of using a text file (or even a Peek stage) to eliminate non-Oracle causes of the problem?

Create a reject link from the stage that is writing the rejects, and send that link into a text file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

DSRajesh,

You need to add a reject link to the Oracle stage to capture the records which Oracle is rejecting (not being inserted). Then place a peek stage on the output link so that you can at least see the records being rejected inthe log. Follow the Peek with a Sequential File stage to save these rejected records to a text file for further analysis.

Code: Select all

transformer------>Oracle- - - - - ->Peek------->SeqFile

"- - - - - -> is a reject link"
As stated, Oracle will add a new column--sqlcode--to each rejected record, which can be used to determine the reason for rejection.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply