Hi,
I have to load a oracle table from a file. There are no keys in the table. In this situation what would be the best approach to load the table with restartability in place..If the job aborts in the middle with some rows inserted, how do i make sure that the same records dont insert into the table again..
I have a log table which has a ID associated with every file. So, I have this ID inserted into the table to identify which file these records are from
These are the options i could think of.
1.Have all the fields has keys and do upsert..But there are so many fields with null values..
2. Use the option of delete then insert(delete all records with the ID field from log table)
3. Have a high commit count..
Anyone faced this issue and what could be the ideal method.
insert/update with no key
Moderators: chulett, rschirm, roy
For secure and reliable restartability, full (bulk) load is the first choice. Doesn't matter what DBMS you are using, or the structure of the table.
For example:
Job 1 -- bulk unload for backup/restore if "new" data cannot be fully loaded.
Job 2 -- merge unloaded data with "new" data, doing any updates as delete/inserts on file instead of to table.
Job 3 -- bulk load of merged data.
We use this method for VSAM file updates. For your requirements, it looks like a good choice.
For example:
Job 1 -- bulk unload for backup/restore if "new" data cannot be fully loaded.
Job 2 -- merge unloaded data with "new" data, doing any updates as delete/inserts on file instead of to table.
Job 3 -- bulk load of merged data.
We use this method for VSAM file updates. For your requirements, it looks like a good choice.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: