From MySQL to SQL Server Migrating and Mapping Tables - mysql

I have a running system on Java and MySQL. Moving the system to .NET environment. I also optimized the db tables on MS SQL which should be filled with the data from MySQL db. So i need to map the tables where to go because they are seperated now. How can i do that? What are the alternatives and the best way for it?
Thanks in advance.

SQL Server Integration Services (SSIS) is a great tool for migrating data between 2 points. You can also use the Import/Export Wizard (right click the database, Tasks, Import Data) that is included in SQL Server as a starting point.

Related

Importing .bak from MSSQL into MySQL database

My companies site uses a mysql database. One of our clients just trying to take advantage of our API is only able to give us the data in the form of a MSSQL .bak file
I have been trying to import the file using the migration tool built inot mysql workbench but have no luck.
On top of that I am trying to see if this can be done in powershell as I would like to automate this process in the future.
Any suggestions or help would be appreciated
You cannot. MS SQL Server backups are proprietary to MS SQL Server and cannot be used with any other RDBMS. You will need to restore this backup to SQL Server, then use an additional tool to transfer the data from SQL Server into MySQL.
Can you do that second portion through PowerShell? Probably. Though SSIS would probably be a better method.

How to load data from MySql to MS SQL Server database?

I have similar schema in both MySQL and MSSQL Server databases. How can I migrate just the data from MySql to an empty (no data) MSSqlServer database? MSSqlServer DB is empty with just the schema. I could not configure the MySql DB as a linked server (through ODBC) since I don't have DB Admin rights on MSSqlServer. I just have previleges to add data. I explored Sql Server Migration Assistant for MySQL, but I just want to migrate data without touching the schema at the target.
I also noticed that there is a SqlBulkCopy class which helps to programatically migrate data in .NET.
But I need to write code for each table (there are more than 100 tables and 20 GB of data).
What is the most elegant way to do it?
SSMA might be the easiest. Since you don't wanna use that, you can try using mysqldump. You can use it to essentially dump a MySQL db to SQL Server.
Link to the SSMA blog, they update these tools regularly, so check for a later version. SQL Server Migration Assistant (SSMA) Team's Blog

Is it possible to export a database from SQL Server 2008 and import it into SQL Server 2005?

I need to move a database from SQL Server 2008 to 2005, did the backup format changed or can I import the exported DB in the SQL Server 2005?
The database has tables, views and stored procedures, and it is not using any 2008 specific features.
If it's not possible, would setting the compatibility mode to SQL-Server 2005 (90) help in this case?
Thank you.
Select your database in SSMS, right-click, select Tasks, select Generate Scripts. In the dialog box that pops-up, enable all options, including script data and make sure you select "Script for SQL Server 2005". Execute the generated scripts on your SQL Server 2005 machine. This is workable only for a relatively small database, of course. Else, you'll have to export/import data via bcp.
You won't be able to do this - the backup file contains a version number, and SQL 2005 will refuse to restore the backup. Similarly, you won't be able to detach and reattach the raw data files.
The only option you have, short of upgrading SQL 2005 to 2008, is to export the SQL schema and sprocs using SSMS's ability to generate scripts, and then migrate the data using (for example) BCP or an SSIS package.
There will be third party tools that might be able to help with some of this (for example, a combination of Redgate's SQL Compare and SQL Data Compare). However this is something you will have to research.

how to import database created in microsoft sql server 2005 to MySql server 5.0

I have created database in microsoft sql server 2005 can i use that particular database in mysql server 5.0 .
There is no common way to perform such kind of migration because of much of differences between these two RDBMS.
The quick suggestion can be: export you MSSQL database into SQL file, open it via favorite text editor, remove MSSQL specific instructions, and load into MySQL using mysql console tool.
This way should be OK for non-complex databases without complex constraints, foreign keys and stored procedures.
Otherwise, you'll need to rewrite these type of database artifacts using MySQL dialect.

I need to convert my Mysql database to SQL Server 2005 database

I need to convert my Mysql database to SQL Server 2005 database, Is there any tools available for this conversion.
I will suggest a generic, standards-based, platform-independent approach, applicable to any two databases. Taken streight from an answer to another question, you can use any of the following tools:
SQL Workbench, using the WbCopy command
an ETL tool, like Pentaho Data Integration
DDLUtils
All of these will allow you to tweak the migration process to some degree (e.g. batch size).