Quantcast
Channel: MySQL Forums - MySQL Workbench - Database Migration
Viewing all articles
Browse latest Browse all 561

Migrating table from Oracle to MySQL fails on column not found, when this column does not exists (no replies)

$
0
0
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

Viewing all articles
Browse latest Browse all 561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>