View previous topic :: View next topic |
Author |
Message |
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 7:49 am Post subject: Doubt in load |
|
|
Hi,
I created table EMPLOYEE with some two columns.
emp id SMALLINT
salary INTEGER
kept emp id as primary key
and created a unique index for that.
using insert statement I inserted some 6 rows to the table.
Then I unloaded the table to one flat file.Using the output of that unload I tried to load again to the same table.The job went fine with maxcc=4 but the
records which i was trying to load where skipped.Why it is so?Why it did not abend?
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 8:00 am Post subject: |
|
|
And It is in copy pending status.
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Feb 15, 2007 8:00 am Post subject: |
|
|
was your table empty when you ran the load? could be that you have an option (in the load) which says: ignore dups _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 8:07 am Post subject: |
|
|
Nope the table was not empty.
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Feb 15, 2007 8:35 am Post subject: |
|
|
kingo wrote: | And It is in copy pending status. |
before or after the load? you are not answering any questions; the answers would help others, help you. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 8:43 am Post subject: |
|
|
The table was in copy pending state after LOAD.
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 8:46 am Post subject: |
|
|
I first inserted some 6 rows and then i unloaded the data into one flat file and then used the same flat file as input to load to the same table.
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
bauer Intermediate
Joined: 10 Oct 2003 Posts: 315 Topics: 49 Location: Germany
|
Posted: Thu Feb 15, 2007 9:06 am Post subject: |
|
|
kingo,
"copy pending": do an image copy or issue -START DATABASE command with ACCESS = FORCE
regards,
bauer |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 9:13 am Post subject: |
|
|
I know that copy pending status can be reset by taking an image copy.My question is when i have created unique index over a column and try to load the same data which is already present in the table it should supposed to result in some DB2 error for the violation of unique index.But my job did not.It didnot give error but instead it skipped the records which are same and gave maxcc=4 and kept the table in copy-pending status.Why did that happen?
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Feb 15, 2007 9:22 am Post subject: |
|
|
kingo,
Quote: |
But my job did not.It didnot give error but instead it skipped the records which are same and gave maxcc=4 and kept the table in copy-pending status.Why did that happen?
|
Look at the SYSDISC dataset from your job. All duplicate keys are routed to that dataset. Also the error messages are also listed in the output in SYSPRINT/UTPRINT dd statements. A load job automatically puts the table in copy pending status. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 9:32 am Post subject: |
|
|
Kolusu,
My question is why it didnt fail?
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 10:07 am Post subject: |
|
|
Load is nothing but bulk insert right.So when we try to insert a duplicate row into a table it will throw some unique index violation error.Why is it not happening in my case here?
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Feb 15, 2007 10:08 am Post subject: |
|
|
kingo,
The Load job does NOT abend if the dups are detected while load.why do you think it should fail ? You are using Load RESUME to append the data to an existing data in the table. so why do you want the job to fail? If you used Load REPLACE then it would have deleted your existing rows and loaded data from your file into the table.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Feb 15, 2007 10:10 am Post subject: |
|
|
kingo,
You are just wasting time. You don't show us the load cards used and how do you expect us to help you ?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
kingo Intermediate
Joined: 01 Sep 2006 Posts: 167 Topics: 40 Location: chennai
|
Posted: Thu Feb 15, 2007 10:11 am Post subject: |
|
|
LOAD resume will append but wont it check when there is same duplicate row.Here I am using LOAD RESUME only replace wont give any problem.
Regds,
Kingo _________________ IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE. |
|
Back to top |
|
|
|
|