Yep. Theres no reason at all why this sort of thing won't work for MSSQL
too. Use SQL Enterprise Manager to generate a create script for all objects
in the database, and also tell it to script referential integrity (FKs,
etc).

Then add anything MySQL specific, such as Type=InnoDB (which you will need
for transactions/FKs, although I believe BDB works as well?).

The only possible problem you will run into is with any code that is
embedded into the database - stored procedures shouldn't be too bad, as the
syntax in MySQL is fairly similar, you'll just end up changing some function
names and tweaking (unless you have very complicated MS SPs). Remember that
there are no table variables in MySQL, and that the syntax to create a
temporary table is 'create temporary table xyz' not 'create #xyz'.

Views of course, are a different matter. In terms of the database structure
itself, without embedded code though, it should work perfectly...

Cheers,


Matt

-----Original Message-----
From: David Carlos Brunstein [mailto:[EMAIL PROTECTED] 
Sent: 11 April 2004 05:23
To: 'Rodrigo Galindez'
Cc: [EMAIL PROTECTED]
Subject: RE: MSSQL to MYSQL

Hi Rodrigo.

I'm facing a similar task but from Informix to MySQL. What I do is:

1. Obtain a SQL script to create the logical database (an Informix tool
give it). You can use Erwin, with reverse engineer and the save the
script.

2. Add the "Type=INNODB" clause for each CREATE sentence. 

3. Divide the scritp into tow: one for the tables creation (with its
primary key)  (CreateDB.sql) and another one for the alter tables to
create the foreing keys (AlterDB.sql).

4. Create a script for loading data from TXT files. First you have to
save every table data from SQL Server into TXT files, then load them
into MySQL tables (LoadDB.sql).

5. Run the AlterDB.sql script (step 3).

It works fine to me.

Regards,
David.
 
======================
David Carlos Brunstein
System Analyst / Software Developer
Buenos Aires, Argentina
 
Mail to: David _ Brunstein @ Yahoo . Com . ar
IM: DavidBrunstein @ Hotmail . Com



-----Original Message-----
From: Rodrigo Galindez [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 10, 2004 3:38 AM
To: [EMAIL PROTECTED]
Subject: MSSQL to MYSQL


Hello list,
    I have to move a database in MSSQL to MYSQL, with the table 
structures and all the respective data. I tested one product to do this,

SQLyog, and it works fine, except for some little problems with indexes 
and primary/secondary keys. I want to know if anyone have been dealing 
with the same problem to recommend me some suggestions/tips/tricks. Do 
you know another program/script/ways to do this migration ? I want to 
migrate everything from the original MSSQL database, like indexes, 
relationships, and so on. Can you guys recommend me some actions or tips

to take ?
    Thanks in advance,

-- 
Rodrigo Galindez
Information Management Assistant
Center for Human Rights and Environment (CEDHA)
Gral Paz 186 10 A
5000 - Cordoba - Argentina
Tel/fax 54-351-4256278
[EMAIL PROTECTED]
www.cedha.org.ar


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to