467,153 Members | 980 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,153 developers. It's quick & easy.

Java / JDBC DB2 export

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
  • viewed: 7775
Share:
3 Replies
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
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
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.

Similar topics

5 posts views Thread by Hassan Naqvi | last post: by
reply views Thread by mailkhurana@yahoo.co.in | last post: by
1 post views Thread by Markus Wollny | last post: by
oll3i
reply views Thread by oll3i | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.