Synchronization of postgres and mysql database server? - mysql

What's the best way to synchronize few tables of mysql server with postgreSQL server?
Currently people are executing scripts, which takes much time, is there any fast solution available from which we can map the tables and columns to synchronize the db server.

You could expose the data from one and consume it with the other. Something like a web service, linked server, open data framework, ODBC driver, etc. Postgres has a nice ODBC driver that works pretty well.

Related

How to connect to a remote MySQL from an Azure SQL server/database

sorry if title is not so clear, probably I am not finding what I need due I do not know how to search
I have few MySQL servers is separated online servers (from different wordpress) and I want to load some of the data on those databases/tablets into a SQL database located on Azure.
inside Azure portal itself I do not see where to establish external connections, neither at server level, neither at database level
I download and install Microsoft SQL Server Management Studio, connect to the server, I can see my databse and the master one, Security with logins, and Integration Service Catalog, nothing else.
I was looking for something like:
https://www.jetbrains.com/help/go/db-tutorial-connecting-to-ms-sql-server.html#step-3-connect-to-microsoft-sql-server-with-datagrip
but nowhere ...
maybe something like this:
https://www.devart.com/odbc/mysql/docs/microsoft_sql_server_manager_s.htm
but no Servers objects option available on my SSMS
Can be this done?
Note: Azure database is a basic wfor now, if that is a limitation
Some choices.
In your SQL Server Management Studio create a linked server pointing to each MySQL instance. You found the instructions for that. https://www.devart.com/odbc/mysql/docs/microsoft_sql_server_manager_s.htm But it probably will not work in Azure SQL Server; you don't have access to the underlying Windows OS to install stuff like MySQL ODBC drivers, which you need. (You could ask Azure techsupport if they can help.)
In each MySQL instance, try creating a federated table connection to appropriate table in SQL Server. That cross-vendor federation stuff only works in MariaDB, however; MySQL's federation only goes MySQL <--> MySQL.
Write yourself a purpose-built extract / transform / load (ETL) program, and arrange to run it every so often. Program it to connect to all the servers involved, retrieve the data needing to be transferred from your MySQL servers, and update / insert that data on the SQL server.
(edit) You may be able to use command-line SQL client programs. mysqldump, with its --compatible option, may generate usable INSERT statements in a file. You then may be able to use sqlcmd to run those INSERTs on your Azure server. It's going to take some hacking, and may take using sed(1) or awk(1) to make the MySQL output compatible with SQL Server.
I believe the third option is the most robust one for production use.

MySQL to MSSQL synchronization

I am trying to synchronise the data from MySQL to MSSQL.
Since my access on MySQL is limited to Read only I am trying to figure out how to sync the data between them.
I tried the DBConvert software which is good only for the initial replication. I know also about linked servers in SQL but this seems to synchronise data from MSSQL to MySQL and not vice versa.
Is there any other way(or software) to accomplish that?
My solution was to use a software called SQL Data Examiner 2012. It's very good for this job but it's not cheap.
I used the command line version which I scheduled with Task Scheduler of Windows and I did some optimisations how to sync the data.

Replication between SQL Server and MYSQL

I am trying to set up replication between SQL Server 2008 and MYSQL. I have installed a MySQL ODBC 5.1 driver on the MySQL server. Initially I was trying to just set up a linked server between the two databases which is working fine.
However now I am trying to set up replication in SSMS. I have created a simple publication but I am having problems setting up the subscriber. The only heterogeneous datasources it seems I can set up under Oracle and IBM. I do however think that I should be able to use the ODBC driver installed and replicate to the MySQL database.
Any ideas?! Thanking anyone in advance
The documentation is very clear that only Oracle and DB2 are supported in any way, and only when using OLE DB, not ODBC. Therefore, trying to set up replication to MySQL using ODBC is almost certainly a waste of time.
Having said that, native SQL Server replication is not the only way to copy data between databases, and if you can give some more information about your requirements then someone may have an alternative solution.
For example, if your goal is some form of reporting or data warehousing then you can look into the many ETL tools that are available and work with many different databases. (I'm assuming your goal is not redundancy or availability, because you're using two different platforms.)

Is there an efficient and free method of migrating a 6GB Interbase DB to MySql?

That's about it. I can always just dump it to csv and read it in, but I was hoping to avoid that.
Since both Interbase and MySql have ODBC drivers, how about using your favorite development environment to write an app that opens each table in the IB database and copies it into the MySql database? There are various languages and IDE's that support data access using odbc.
This would be nicer than using csv because your code could copy the schema during the process of copying each table.
You can use Database Workbench
Cross database development
Use the Schema Compare and Migration
Tools to compare testing and deployed
databases, migrate existing databases
to different database systems.
ps: I don't know why you want to migrate from Interbase to MySQL but you can also take a look to Firebird

ADO.NET (Sql Compact + MySQL + IBM db2 expressC)

I'm developing an app which will have a central database users can add entries to. The database will have to be on a server somewhere but I want the users to be able to add entries offline. The app will sync to the main db when connection is available. So, I supose I need 2 databases - the main one sitting on a server (preferably linux) and a small one on each client machine to use as a buffer when offline. The app will be coded in c# for windows. I'm having trouble deciding what databases to use and whether I can leverage any replication technology to make this easier. Also, I don't want to pay for anything ;) So I guess my questions are...
Will I have any trouble writing code in ADO.NET to move data from something like SQL Compact Edition to MySQL?
Are there any replication solutions which will move stuff from local to main database for me
I've recently discovered IBM's db2 expressC but I'm not sure if it's serverless as well as server installed. Does anyone know?
Firebird can be server or serverless. Can I replicate between them. Is the server mode capable of heavy use?
Firebird can be server or serverless.
Can I replicate between them.
Yes.
Is the server mode capable of heavy
use?
Define 'heavy use'. I've had production systems with 200 simultaneous users pumping 20 transactions/minute each on databases in the 10-20GB range. I'm sure there are many larger deployments out there.
Also, what you describe seem like the 'briefcase model'. You should look into it if you haven't already done so. Maybe the solution is not replication at the database level, but rather a smarter fat client.
Just answering two of your questions; I don't know about DB2 or Firebird.
Will I have any trouble writing code in ADO.NET to move data from something like SQL Compact Edition to MySQL?
That should be very trivial; install MySQL Connector/NET and you're good to go.
Are there any replication solutions which will move stuff from local to main database for me
SQL Server replication is made for this, but I don't suppose it would work with MySQL.