I try to select data from MSSQL in MySQL over straight way. I want to store the result in a view.

What did I do now:

Add the MSSQL Server as a ODBC Datasource.

  • 1
    The MariaDB fork of MySQL can use ODBC to remotely access a table in SQL Server. mariadb.com/kb/en/… But MySQL doesn't have this feature. SQL Server can remotely access a table in MySQL with ODBC.
    – O. Jones
    Jun 22 '20 at 13:07

MySQL won't do this. It doesn't have that feature. Sql Server, Oracle, Postgresql, and even MariaDB and MS Access all have the ability to create views which rely on remote databases of other types (including MySQL), but MySQL does not.

So, you could go the other direction, and let Sql Server create a view that uses MySQL data, but you cannot have MySQL create a view using data from Sql Server.

The only workaround is an ETL (Extract/Transform/Load) process in a cron job, the queries Sql Server and copies the data into MySQL table on some kind of schedule.

  • thanks. I will find a other way.
    – SlipTom
    Jun 22 '20 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.