Hi,
You can use an external replication tool like Golden gate for replication between MySQL and Oracle.
Thanks
Suresh Kuna
MySQL DBA
Sent from BlackBerry® on Airtel
-----Original Message-----
From: Mikhail Berman <mikhailber@stripped>
Date: Wed, 06 Jan 2010 10:42:14
To: machiel.richards<machiel.richards@stripped>
Cc: <mysql@lists.mysql.com>
Subject: Re: table export in cron
Hi Machiel,
As an alternative, you might consider use of mysqdump command,
http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html, in a KSH/BASH
script running from cron
The script might look like this:
=====
!#/bin/ksh
mysqldump --password=yourpassword [more switches needed here]
your_database your_table > /path/to/output/file
====
mysqldump command has switches to accomplish fields termination as you
need, plus it gives opportunity to specify target database via
--compatible=name
<http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html#option_mysqldump_compatible>switch.
Hoping this helps,
Mikhail Berman
machiel.richards wrote:
> Hi all
>
>
>
> I have a question regarding exporting of tables to a file
> from mysql.
>
>
>
> We need to export tables from mysql to a delimeted file
> which will then be imported into another database (oracle).
>
>
>
> We can do this manually from within mysql using the
> following command:
>
>
>
> select * from <table> into outfile
> '/path/to/output/file' fields terminated by '|';
>
>
>
> This needs to be configured though to be run in a cron once
> every week at a specific time.
>
>
>
> How can we do this when running in a cron script?
>
>
>
> Your assistance is appreciated.
>
>
>
> Regards
>
> Machiel
>
>
>
>
>
>
>