Ravi wrote:
Hi friends,
I have to lode/import the data from files, is there any command to
lode/import, in same time ( with singal command) iam using db2 8.2.
Do you want a single command - out of a desire for simplicity? or to
avoid data quality problems? Or some other reason? And is this a
one-time-only need, or for a recurring process? Because I'm not aware
of a way to load/import multiple tables with one command.
But if you're going for simmplicity, you can very easily wrap the
load/import command in a function in perl/python/ruby/korn shell/bash
shell/etc - then just call it repetitively with table names & file
names. My data mart loaders work this way - typically
loading/importing 30 tables but are very maintainable.
On the other hand, if you're dealing with users hitting the tables
while you're loading/importing to them and will break referential
integrity during the process there are a variety of other, fairly
complex options:
* keep two copies of data and flip between them through views or
catalogs
* if your data allows it, use a view that turns on sets of rows
based upon entries in another table - which is the last table loaded
* write a custom app in which all related data is loaded in a single
transaction then committed before next set is loaded
buck