Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / May 2006

Tip: Looking for answers? Try searching our database.

Java / JDBC DB2 export

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
info@daten-host.de - 04 May 2006 14:02 GMT
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....
Knut Stolze - 04 May 2006 14:20 GMT
> Hi,
> how could I do an export of tables via Java / JDBC.
[quoted text clipped - 4 lines]
>
> 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?

Signature

Knut Stolze
DB2 Information Integration Development
IBM Germany

info@daten-host.de - 04 May 2006 15:18 GMT
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?
Knut Stolze - 04 May 2006 18:55 GMT
> 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.

Signature

Knut Stolze
DB2 Information Integration Development
IBM Germany

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.