Copy Database Structure From MS SQL 2005 to MySQL 5.1
I want to Replicate a database without data (Only the str开发者_C百科ucture) with stored procedures from MS Sql Server 2005 to My SQL 5.1. Is there an easy way of doing this.
I have Installed the MySQL Workbench 5.2
In SQL Server Management Studio you can right click on a database and go to Tasks->Generate Scripts... Then you can basically go through generating the SQL queries that will work in MySQL
My first thought would be to not include any indexes, constraints or foreign key stuff in the queries, as MySQL handles these quite differently to SQL Server.
Just practice a few times and note down what causes errors when you use the queries in MySQL.
Using the knowledge of how MySQL handles your database objects you can try and create stored procedures that generate the queries that will create these objects on MySQL and then execute them against the MySQL database.
EDIT :
Ok so you want to move stored procedures over from SQL Server to MySQL. This is a fairly tricky thing to do if the stored procs are complicated.
Here is the basic overview I suggest you read before asking more specific questions about your problems.
http://dev.mysql.com/tech-resources/articles/migrating-from-microsoft.html
My advice is you read this and then try and migrate your stored procs and if you get errors, come back and ask specific questions about them.
精彩评论