I have MSSQL 2005 server and I have MySQL database in intranet. I want to replicate some tables from MSSQL database to MySQL database.
I have created ODBC licnked server and have successfully created transactional publication and I have manually created exactly same tables in MySQL and replication seems to be working.
The reason why I have manually created tables in MySQL is because there was a problem creating keys and indexes from within replication from MSSQL. What happens is when replication runs it converts varchar(200) field into MySQL varchar which this field becomes mediumtext in MySQL Table and show an error when trying to create a primary key or index. How should I configure the publication to create exact copy of table fields with correct length in MySQL?
I have MySQL ODBC 5.1 driver installed on server.
EDIT:
When I see MySQL.Log file it shows query
CREATE TABLE `Inventory`(
`SKU` long varchar NOT NULL,
which becomes mediumtext in MySQL database afterward. That show error something l ike
BLOB/TEXT column 'SKU' used in key specification without a key length
in MSSQL replication job history. When I look into table in MySQL the Field type for 'SKU' is mediumtext.