By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,287 Members | 1,284 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,287 IT Pros & Developers. It's quick & easy.

How to lode/import all files in same time

P: n/a
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.
Thanks In advance,

Ravi.

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

Nov 12 '05 #2

P: n/a
Have you checked the "Command Reference" manual?? The explanation of the
LOAD command is there and it clearly specifies that multiple input files
are allowed.
LOAD ...... FROM file1,file2,file3,...,filen ...........

Manuals are available online from IBM's website:
http://www.ibm.com/software/data/db2...manualsv8.html

Phil Sherman

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.
Thanks In advance,

Ravi.

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.