I have an Oracle database that runs a PL/SQl job once every week to copy data from a table in the Oracle database to another Oracle database using Oracle database links. Both systems run on Unix/Solaris. The job is scheduled and executed via the Unix Cron facility.
The remote machine is now being migrated from UNIX to a Windows platform with a MSQL Server database. I have been looking into the possibility of using Oracle database links to connect from UNIX to the MSSQL Server database which will be running on a Windows platform. It is possible but it looks to me like there is a lot of fiddling around to get it to work and there is not a lot of information on how to implement it.
The other solution i am thinking of is to implement the process as a Java daemon process that will run every week. All it will do is connect to the Oracle database read data from some tables, connect to the MSSQL Server database and run some insert commands. I think i will need two kind of drivers for this - i.e. jdbc for Oracle and jdbc for MSSQL Server.
Does Spring provide any facility that will make the above easier to implement and or maintain? (Specifically the multiple drivers and the scheduling part of the requirements)
Is Hibernate suitable for managing the multiple database connections or is that overkill?
Feel free to also suggest a better solution :)
Thanks
Spring has extensive support for scheduling tasks.
Running queries against multiple databases via different drivers is a basic JDBC feature; Spring is not really relevant there - unless you want it to happen in a single (distributed) transaction. Spring does support those via JTA and XA.
This sounds like a perfect application for Spring Batch
You should check these Pages to see what it's about:
Spring Batch will happily accept different datasources with different drivers, but you will probably have to provide some RowMapper
objects to create interim Objects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With