MySQL Forums
Forum List  »  Oracle

Migrating table from Oracle to MySQL fails on column not found, when this column does not exists
Posted by: Nirit Leibovitch
Date: December 28, 2014 05:55AM

I'm trying to populate MySQL table from Oracle. On GUI all is well. but when I take the script and try to run it as a batch it fails, on 'column not found in target table', when this column is not in the source or target.
Oracle source table:
CREATE TABLE "SYS_COUNTRY"
( "ID" NUMBER(10,0) NOT NULL ENABLE,
"ISO_CODE" VARCHAR2(6 CHAR) NOT NULL ENABLE,
"NAME" VARCHAR2(100 CHAR) NOT NULL ENABLE,
"CONTINENT_ID" NUMBER(10,0) NOT NULL ENABLE,
"GEO_SCRAPING_NAME" VARCHAR2(100 CHAR));

MySQL target table:
CREATE TABLE sys_country
(
id INT(10) NOT NULL,
iso_code VARCHAR(6) NOT NULL,
`name` VARCHAR(100) NOT NULL,
continent_id INT(10) NOT NULL,
geo_scraping_name VARCHAR(100)
)ENGINE=INNODB DEFAULT CHARSET=utf8;

Script:
WbCopy -sourceProfile=Oracle_rd_g8_integ1
-sourceGroup='Default group'
-targetProfile=mysql_rd_g8_cms_test
-targetGroup='Default group'
-targetTable=sys_country
-sourceTable=SYS_COUNTRY
-ignoreIdentityColumns=false
-deleteTarget=false
-continueOnError=false
;

command:
java -jar sqlworkbench.jar -script=WbCopy.src -logfile='/tmp/log.err'

error log:
...
2014-12-28 13:31 INFO Connected to: [Oracle], Database version: [Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning option], Driver version: [11.2.0.3.0], JDBC Version: [11.2], ID: [$Wb-Copy$-Source-1$]
2014-12-28 13:31 INFO Using savepoints for DML: false
2014-12-28 13:31 WARN Column COUNTRY_NAME not found in target table cms_test.sys_country. Ignoring mapping!

....

I tried adding -columns to my script, but it didn't help.
When I create an Oracle table with column name c_name instead of name, all is OK.

How to I move my data to MySQL without changing the Oracle table?

Kind Regards,
Nirit

Options: ReplyQuote


Subject
Views
Written By
Posted
Migrating table from Oracle to MySQL fails on column not found, when this column does not exists
907
December 28, 2014 05:55AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.