Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
It lets me unload in one utility statement.
But when I try to load again, it makes me specify a partition number:
Code:
LOAD DATA RESUME YES SORTKEYS 8 FORMAT INTERNAL ENFORCE NO
- INTO TABLE PEDRO.ZZZZZZ DISCARDDN(DISCARDN) PART 1 INDDN SYSREC
I specified a template for DISCARDN.
When I do a load, I get a bunch of these:
Code:
RECORD (nn) FOR PARTITION 1 WILL BE DISCARDED DUE TO PART OR HIGH KEY VALUE
It seems like I have to load each partition individually. It is going to read my SYSREC file multiple times. Is there a way to load all partitions at once?
You are trying to load at partition level(ie., when you specify INDDN after INTO TABLE statement)
Code:
LOAD DATA RESUME YES SORTKEYS 8 FORMAT INTERNAL ENFORCE NO
- INTO TABLE PEDRO.ZZZZZZ DISCARDDN(DISCARDN) PART 1 INDDN SYSREC
To load all the partitions at once when you don't know in which partition data will go into, load at table level and concatenate the input datasets in SYSREC. Like below for example.
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
Sushanth, your example does not include DISCARDDN, which is a big part of my problem. When you specify DISCARDDN, then it requires 'PART n' to be specified. I guess you are supposed to use a different DISCARDDN for each partition.
I was expecting that a TEMPLATE would resolve this problem, but it does not.
I tried below it worked. I am working on DB2 V10 and this table has 10 partitions. Below example is a LOAD RESUME, table has already some millions of data and data in the input file might contain duplicates which are already existing in the table and in the load process i want that to be discarded as well.