Target Table gets locked after 27000 records get inserted

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

nkln@you
Premium Member
Premium Member
Posts: 271
Joined: Wed Nov 17, 2004 5:15 am
Location: US

Target Table gets locked after 27000 records get inserted

Post by nkln@you »

I ran a job.

The job has once source ORACLE 9i stage, one transformer and one target ORACLE 9i stage.


41,000 records were selected from source ORACLE 9i stage . but after 27,000 records were inserted into target, i can see the job remaining standstill i.e there is no increase in no. of records written to target. Only rows/ sec is getting reduced ( e.g from 900 rpws/sec to 6 rows/sec) .
After that target table gets locked. In director when i open log for that job, i can only see processing symbol. The update action used is "clear table and insert rows".

Help me in solving this problem
Aim high
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hello nlkn,

there are a couple of things you need to do in order to narrow down your problem. First off, you don't know if the READ or the WRITE is causing the the error - try changing the output to a sequential file and see if the program does the same.

Do you have any errors in the log files? What is your commit frequency (i.e. are your ORACLE buffers overrunning). How do you know that 41K records were selected - does this mean the monitor showed 41K rows coming from Ora and going to the transformer?

I would recommend changing your output link first and seeing if the error still occurs.
wnogalski
Charter Member
Charter Member
Posts: 54
Joined: Thu Jan 06, 2005 10:49 am
Location: Warsaw

Post by wnogalski »

Try to check if there are any locks (and if there are check what's the cause) using f.e. Enterprise Manager or ask Your DBA for help :)
Regards,
Wojciech Nogalski
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Any chance you're sourcing the same table you are inserting into?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
yaminids
Premium Member
Premium Member
Posts: 387
Joined: Mon Oct 18, 2004 1:04 pm

Re: Target Table gets locked after 27000 records get inserte

Post by yaminids »

Hello there,

I faced the same problem. In my case, the main problem was the tablespace. I was trying to insert about 4million rows and the DBA did not allocate the necessary table space. I would suggest you to check the table space allocated.

-Yamini
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

In short, ask your DBA to look at the process running on Oracle to confirm the SQL statement's validity and running.
Aravind
Participant
Posts: 16
Joined: Mon Dec 27, 2004 4:17 pm

Post by Aravind »

Any constraints in using Oracle Bulk loader
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Aravind,

DataStage imposes no additional constraints in using the Oracle Bulk loader.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You can use SQL Loader but must have your own management of commit points, bad, discard and log files. Also to disable and enable constraints as necessary.
nkln@you
Premium Member
Premium Member
Posts: 271
Joined: Wed Nov 17, 2004 5:15 am
Location: US

Post by nkln@you »

Hi,

thanks for your suggestions. I got themistake. there was a primary key constraint violation for every row inserted in the target, so after 27,000 records got inserted, processing stopeed.


This is the reason i think. is this the mistake?
Aim high
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You didn't notice 20,000 yellow error messages in the job log??? :cry:

We threw a lot of guesses your way.

Add a Reject link to your job in the transformer right before the DB stage going to a reject file. Next time you have this problem, you'll see those rows that fail to load go to this file.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And set the job to Abort after X number of Warnings... with X being a number significantly smaller than 27,000. :wink:

And Ken, since two warnings are logged for each pk constraint error, that's more like 54,000 warnings to the log. :shock:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

....and set small commit size and wait forever for even the 27000 rows to appear.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

chulett wrote:And Ken, since two warnings are logged for each pk constraint error, that's more like 54,000 warnings to the log. :shock:
41,000 total - 27,000 good = 14,000 bad

2 warnings messages per issue X 14,000 bad = 28,000 total warning messages

My guess was closer, without going over. I win the showcase showdown. 8)
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Show him what's he's won, Johnny! [applause]
-craig

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