I have configured two servers: one MySQL and one MS SQL server.
Application will run on Linux server with MySQL database as data storage.
When a new row is added to specific table in MySQL I need to push that row into specific table in MS SQL server.
I know that on MSSQL can be configured Linked Server targeting MySQL server via MySQL ODBC Driver.
But how to force synchronization from MySQL? Can I somehow use trigger in combination with something to do my job?
Related
Situation:
I have a MySQL database and SQL Server database, both in AWS RDS. SQL Server is 2016. I need to be able to select data from the MySQL db (in SQL Server). Before moving to RDS, I was able to accomplish this by creating a Linked Server in SQL Server using the MySQL Connector/ODBC.
My understanding is that ODBC driver must be installed/setup on the SQL Server (box), which isn't possible with RDS.
I looked at CLR, but not sure if that will be a viable route either (from reading online) with RDS (?).
Any ideas/experience on how I can select data from the MySQL database in SQL Server when both databases are housed in RDS? The solution doesn't need to be high speed and probably only needs to be used 100 to 200 times.
Only thing I can think of is to create a cache table in SQL, use my application layer to copy the MySQL data to the SQL cache table, and then use that cache table instead of MySQL directly.
Thanks!
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
Can I use federated tables to make the integration of mysql and mssql ?
I tried and it worked mysql to mysql , but if I try to connect to mssql , do not work.
Thank You.
As per MySQL 5.7 Reference Manual - 15.8.1 FEDERATED Storage Engine Overview:
The local server communicates with the remote server using MySQL client C API functions.
... which, naturally, can only connect to mysqld.
MySQL Workbench - Database Migration: Microsoft SQL Server to MySQL gives an overview of options to transfer data between mssql and mysql. They can be summarized as:
Access mysql from mssql through ODBC by adding the former as a "linked server"
Transfer data between the two (either direction) with IDEs (by hand, i.e. one-time)
Transfer data between the two (either direction) with a program that can access both, possibly including data conversion
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
I need to access a remote Microsoft SQL Server database from a stored procedure in MySQL database.
I googled and found that there is a way to access a remote MySQL using federated tables. But I couldn't find anyway to do access MS SQL Server. My exact requirement is, I need to write a stored procedure which can duplicate all the tables and data from a remote MS SQL server database to a local MYSQL database.
Please help..
In short this cannot be done with MySQL federated engine. However you can setup a link from the remote MSSQL server to a MySQL table using the linked server feature of the MSSQL server.
If you can set this up you can have a scheduled job populate the MySQL tables from the MSSQL server side.
I have done the above setup and it is not to difficult.
I would also investigate some ETL tool to do this as it sounds like a ETL job and not something you want to run via stored procedures.
Good Luck.