Synchronizing data from MySQL to Oracle



  • How do you get mySQL database backup into Oracle?



  • If the baccap is already made (with default options), there's a lot to clean up. It's easier to reboot it in MySQL and pull it out in the right way.

    Road 1 (if data are not much and migration has to be done once):

    1. mysqldump --skip-opt --compatible=oracle.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    2. replace varchar-state varchar2 and possibly something new
    3. Empty in Oracle, feeding sqlplus'u

    Mode 2 (if the data are multiple and/or the operation will have to be repeated, i.e., automation:

    (1) Separately and imaginatively reschedule the data (in Oracle no AUTO_INCREMENT, but there is SEQUENCES, etc.)

    (2) From MySQL, keep the plates in CSV (each separately). About:

    SELECT col1, col2, .. INTO OUTFILE '/tmp/result.text'
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    LINES TERMINATED BY '\n'
    FROM mytable;
    

    (3) Download to Oracle SQLDR'm

    Road 3 (for BI fans)

    Use BI Tool (Pentaho / TalenD / etc.)




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2