Re: Oracle 8.1.7 to MySQL: problem with SP and sequences
Hi Mike,
I replaced the MigrationOracle.* files. The MT now converts all strange data types (NUMBER(100), FLOAT(126)) to VARCHAR(255) as expected.
Here is what the object inspector says about a column with a NUMBER(100):
fd21e0c931871c88:-25645814:105c85dd900:-7fe8-25645814:105c85dd900:-7fe7
FLOAT
0
0
0
LIST
1
22
VORABZAHLUNG
0
0
fd21e0c931871c88:-25645814:105c85dd900:-7ff8-25645814:105c85dd900:-7ff7
100
0
{473A5724-6E51-4244-82E4-799429743DAD}
0
Interestingly, it reports the type as FLOAT, but a DESCRIBE on the corresponding table reports type NUMBER.
Nevertheless, the MySQL type is now VARCHAR(255).
Thank you very much!
---------------------------------------------------------
Now the next problems arise, but as far as I can tell, they are easy to fix:
Under "Schema Creation" / "Creation Results", the tool still shows errors that occured during object creation, now revealed because of the previous fix.
There are three types of errors:
1. (errno 1089)
"Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys"
A corresponding CREATE statement looks like this:
CREATE TABLE `foo`.`bar` (
`date_time` DATETIME NOT NULL,
INDEX `fubar` (`date_time`(7)),
)
ENGINE = INNODB;
FIX: remove the "(7)" and everyting works fine
2. (errno 150)
"Can't create table '.\<schema>\<table>.frm' (errno: 150)"
The problem with all these tables is: the target database already contains some tables that start with the same letters, e.g. creating "fibu_kontengruppe_detail" doesn't work because there already exists "fibu_kontengruppe".
This is probably a limitation of MySQL itself (although it would be braindead to limit the number of letters that uniquely identify a table).
FIX: check target database for existing tables (probably created the MT itself) and suggest renaming.
3. (errno 1170)
"BLOB/TEXT column '<column-name>' used in key specification without a key length"
A corresponding CREATE statement looks like this:
CREATE TABLE `foo`.`bar` (
`alias` MEDIUMTEXT NOT NULL,
PRIMARY KEY (`alias`)
)
ENGINE = INNODB;
FIX: supply a key length
These are all errors I get by now (and I'm pretty sure there won't occur any other).
Will you fix these or do we have to manually edit the CREATE statements?
Greets,
Philip