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

Java / JDBC DB2 export

P: n/a
Hi,
how could I do an export of tables via Java / JDBC.
There are very big tables.

I thought about:
EXPORT TO c:\aa.ixf OF ixf SELECT * FROM TEST1

How could I call this from JDBC / Java?

Any other ideas?

Thanks a lot....

May 4 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
in**@daten-host.de wrote:
Hi,
how could I do an export of tables via Java / JDBC.
There are very big tables.

I thought about:
EXPORT TO c:\aa.ixf OF ixf SELECT * FROM TEST1

How could I call this from JDBC / Java?


EXPORT is not a SQL statement so you can't invoke it through JDBC. What you
could do is to write a stored procedure that invokes the respective DB2
API. However, with a procedure you will export the data to a file on the
database server.

Could you elaborate a bit more on what you want to do with the exported
file?

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
May 4 '06 #2

P: n/a
First of all: Thanks!!!
I need to export some tabels from an DB2-Server (java is running on a
different server) an import it later to another DB2-Server.
I tried it with xml, but some of the tables are bigger than 3 GB :-(

Do you have an example for the stored procedure?

May 4 '06 #3

P: n/a
in**@daten-host.de wrote:
First of all: Thanks!!!
I need to export some tabels from an DB2-Server (java is running on a
different server) an import it later to another DB2-Server.
I tried it with xml, but some of the tables are bigger than 3 GB :-(
You should check that your file system allows files bigger than 2 GB. Maybe
this isn't DB2's fault. (I don't know the facilities of XML well enough in
this respect.)
Do you have an example for the stored procedure?


Have a look here: http://tinyurl.com/j5mxs This wraps the LOAD
functionality into a procedure. I'll have to adjust it to the EXPORT API,
which should be easy to accomplish.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
May 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.