sql server table relationships to port to MYSQL - mysql

I ported a MS SQL 2008 database to MYSQL using a tool (NaviCAT). All the tables ported OK and the data seemed intact.
But now I am implementing a project using that MySQL database and I noticed that all the table relationships where gone.
Anyone knows how I can port a MS SQL database to MySQL without losing the table relationships or if there is a way to just port the relationships?.

Related

Creating a SQL server view from multiple DB engines?

I have a SQL server DB, a Oracle DB, a MySQL DB. I have a way to join the tables from each DB. How would be the best way to create this view? I have just started SSIS project that pulls the tables from the DBs and creates the view I want, but is there a way to grab the data from each engine in the view in real-time\dynamic?
Thr best way to do that is to create a linked server for each instance (Oracle, MySQL) on sql server without the need to copy data.
And then you can create a view that join the tables between instances.
For more information, you can follow these articles:
Create Linked Servers (SQL Server Database Engine)
Create a linked server to MySQL from SQL Server
Creating a SQL Server 2014 Linked Server for an Oracle 11g Database
SQL Server Linked Server Example Query

Create a mysql view from sql server tables

I'm trying to create a mysql view from some sql server tables but I have not found the way. I have created a lot of views and tables in sql server from mysql tables with a linked server on sql server management studio but now I'm trying to do it to the other side.
You cannot do that, MySQL does not have the concept of linked servers connecting to other RDBMS products. The federated table engine can only connect to other MySQL servers.
You have to push the data from the ms sql server side into MySQL tables and you can create a view based on those tables within MySQL.

how to do Data replication on MS SQL Linked server

We have created a MS SQL Linked server for a MYSQL database...I have a data replication questions related to linked server
1.Once a MS SQL Linked server is created between MYSQL and MS SQL,if we insert any new data into existing tables of MYSQL,does the data get automatically replicated to the MSSQL Linked server?
2.If we add new tables or columns how to data replication is handled between MYSQL and MS SQL linked server?is there an automated way to replicate data?
A linked server in SQL server simply provides you the capability to issue commands against a remote server. It does not mean any kind of replication will happen automatically for schema or data. As to how to actually accomplish replication between SQL Server and MySQL, the question has been asked and answered many times. As far as I know you will need to use a third party framework or roll something of your own via ETL, triggers, etc.
https://msdn.microsoft.com/en-us/library/ms188279.aspx
Replication from MySQL to MS SQL

I need to create a table in MYSQL from MSSQL and insert/update data

I have a MS SQL 2008 server with a database and need to create a table in MYSQL from a table/data in MS SQL. The mysql database has been linked and I have full access to the database. Can I do this using openquery?
OPENQUERY doesn't let you run DDL statements against remote databases. To the best of my knowledge, MySQL doesn't have an equivalent method of interacting with other RDBMS's.
You can however do this from SQL Server using the Import/Export Wizard to copy your table to MySQL. You may need to install MyOleDB or a similar driver to connect to MySQL.
Please see http://msdn.microsoft.com/en-us/library/ms140052%28v=sql.105%29.aspx

Copy records from a table in mysql database to a SQL-SERVER 2008 database?

How can I copy all the records from a table in a MySql database to another table in a SQL-SERVER 2008 database?
I have tons of records in that mysql table and I'm trying to "migrate" the data.
I tried using the "MS SQL Server Migration Assistant for Mysql", but it only migrated the structure (table names, indices, etc..).
I would look into SQL Server Integration Services (SSIS) Packages connecting to mysql here
I would also see if OPENROWSET() is something that would work for you