Hi,
is there a convenient way to do a batch "select * from product" from a Database 1 and getting doing a batch Insert in DataBase 2 with Spring. I see that the JDBCTemplate return a List with the queryForList() method. The problem here is that the list returned might be too big. I need to transfert 10 million records from DataBase1 to DataBase2.
The best way, I guess, would be to insert the row from the RecordSet parsing loop.
Can I use the RowCallbackHandler to do this job?
I need to do this job :
Should I do it in plain jdbc or can I use the Spring framework?Code:- resultSet = getTheResultSet("Select * from Product"); - Start While (looping in ResultSet){ -- get row from ResultSet... -- Insert Row from ResultSet to Row In DataBase2 -End while. -close all jdbc stuff.
Thanks.
Etienne


Reply With Quote