| Migrating from MS SQL Server to MySQL |
|
I hesitated awhile where to put this article - to microsoft sql server or MySQL section. In the end I decided it more relates to MySQL.. Very often DBA faces the fact that he can't populate his ms sql server database. The reason may be that operational system other than windows or license restrictions etc. In such situation the most popular solution is MySQL dbms. Because it is absolutely free, cross-platform, open source, available on any hosting and relatively functional/fast. So you need to get your ms sql server database working on MySQL. This is often much more than simply converting data, you should also migrate your application. Migration considerationsFirst of all, before you start your migration you should consider all details of difference between these database management systems. I mean incompatible features, difference in data types, sql syntax difference, known performance issues etc. After this you will be able to write down your migration plan, that should allways include entire testing phase. Data typesEven though there is a lot of similarity in data type names in MySQL and MS SQL Server the data type constratints and even meaning are very often different. For instance
Full list of MySQL data types can be found here and the full list of T-SQL data types here Built in function names very. For instance IsNULL of T-SQL corresponds to IfNULL in MySQL and IfNull returns boolean result unlike IsNULL - first or second argument. MySQL engines has much more embedded functions than ms sql does. There is major difference in User Defined Functions (UDFs). In MS SQL Server UDF is a piece of t-sql code, while in MySQL it is compiled C-code assembly which can be assigned to function name similarly to CLR functions of MS SQL Server. Only 5.x version of MySQL supports stored procedures, however you will probably need to change you t-sql stored procedures code. The great feature of MS SQL Server is its maintenance plans. In MySQL you will need to develop your own solutionfor regular backups or use third-party vendors solutions. There is veriety of tools for MySQL - SQL Server and other side migration.
Migrate MS SQL Server db to MySQL using SSISFirstly, you will need to add your destination mysql server to your source sql server as linked server. For this purpose you will need to install MyODBC driver. You may download it here. After considering all restrictions of sql server - mysql migration you might decide to rewrite your database from scratch for mysql which is also a proper solution Comments (0) |