Automating Migration from SQL2005 with GRTSH fails due to Default (0)
Posted by: Phill Barnes
Date: April 06, 2009 10:11AM

Dear all,

Extremely new to this and it has had me baffed for a while now. I am using the migration toolkit 5.1.17 to transfer a schema from MS SQL 2005 to MySQL. However i am receiving the following error,

"An error occured while executing the SQL statement. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(0),"

for the lines, `OPT_Poa` TINYINT NOT NULL DEFAULT (0) and `OPT_Default` TINYINT NOT NULL DEFAULT (0), in the following code. This happens on 3 tables but have provided this one as an example.

CREATE TABLE `PUB_LIGHTS_dbo`.`NVDOptions` (
`OPT_Id` INT(10) NOT NULL,
`OPT_OptionCode` INT(10) NOT NULL,
`OPT_EffectiveFrom` DATETIME NOT NULL,
`OPT_EffectiveTo` DATETIME NULL,
`OPT_ModifiedDate` DATETIME NOT NULL,
`OPT_Basic` DECIMAL(19, 4) NOT NULL,
`OPT_Vat` DECIMAL(19, 4) NOT NULL,
`OPT_Poa` TINYINT NOT NULL DEFAULT (0),
`OPT_Default` TINYINT NOT NULL DEFAULT (0),
PRIMARY KEY (`OPT_Id`, `OPT_OptionCode`, `OPT_EffectiveFrom`)
)

Now i know i can fix this by removing the parenthesis, however as i mentioned earlier i am trying to automate this. So when i save the migration script and try to run it, it fails at this point, and i have searched the migration script for any settings i can change to resolve this, however it is a little over my head at the moment and i cannot find anything to change.

I have tried to correct this by preventing it from creating the schema in the as i have a creates.sql that i generated that will do this for me which works, but i can't even figure out how to prevent the migration toolkit from creating the schema.

Any help or advice on this issue would be gratefully appreciated.

As a bootnote, does anybody have any idea when this DEFAULT (0) bug will be fixed?

Thanks in advance.

Regards

Phill

Options: ReplyQuote


Subject
Written By
Posted
Automating Migration from SQL2005 with GRTSH fails due to Default (0)
April 06, 2009 10:11AM


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.