I need a well written php script that will connect to an oracle DB which lives on “serverA”, run a select statement on a table and then import the results into a mysql database table “serverB”. The script must drop the current data that is contained in the MySQL table before inserting the new data.
Once the import/export package is completed, I would like to use cron or windows scheduler to run this job on a daily basis.
ServerA (Solaris & Oracle 11G)
ServerB (Windows running wamp, MySQL version [url removed, login to view], [url removed, login to view], [url removed, login to view])
The final scripts should be well documented so if I need to modify them later, like connect strings or add additional tables I can do this on my own. Also I would like error’s and success visible, so if the script fails I know what is happening.
As you will not have access to my servers, this job will be complete and successful when I can do the following:
1. Update the PHP scripts with my own Database server information (both MySQL and Oracle).
2. Update the PHP script with my own queries and inserts.
3. Run script, which will make a valid connection to both DB’s
4. Drop current data in a table on the MySQL db.
5. Query a table on the OracleDB
6. And insert the queried data into the MySQL db.
7. Provide a status on the php page that the process is working, completed or in error.