# Miscellaneous > Database Programming >  Best practice to invoke query: from Oracle to MySQL

## BobSpero

I am in the process of building a Java utility to Select data from Oracle and inserting to MySQL via Hibernate. Rather than scheduling a shell script to run every X interval. Is there any way to tap into Oracles CDC (Change Data Capture) to detect when the database updates to invoke my java util? Or better yet what would be the best method to select specific records and house them in mysql on a routin basis?

----------


## NinjaLord

If you don't have to do it in Java but can work in Eclipse, try IRI NextForm (DB Edition) to set a time-based query condition in the input phase of the job and direct the target rows into MySQL via its ODBC method. If the tables are massive though, write a similar query in the config file of IRI FACT (Fast Extract) for Oracle. Use IRI CoSort to filter, pre-sort, etc.  and then bulk-load MySQL with a named-pipe output from CoSort.

----------

