[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 897
  • Last Modified:

commit issue with import in db2


Please help me with this scenario:

Problem :
I have around 10 tables(having relationship with each other) and a data
asc file for each. i use import utility to load all the data one by one
for each table...these files are almost 1gb each. I need to commit data
only when all the 10 table imports are done as the data is relational
dependant , not after each table import is finished as the import
commits as it is done with the inserts/updates for one table...

The tables are in use by the users  so can drop relationships, Can i
use import in stored procedure.? or if these all imports can be clubbed
in a transaction. The data is either inserted or
updated(using  insert_update option of import)

please advice.
2 Solutions
create a updatable view and import into view (instead of table)
Kent OlsenData Warehouse Architect / DBACommented:
Hi chee_torr,

I would think that the easiest solution is to just order the imports so that you don't violate the RI.

But the fastest method is to disable the RI, import the data, and then enable the RI.

Good Luck!

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now