Creating a SQL server view from multiple DB engines? - mysql

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

Related

How to create a Table with same structure from MySQL in SQL server Using Store Procedure or SSIS Functionality

I have some list of Tables to be created in SQL Server with the same structure as they are currently present in MySQL DB.
Tools which i can use are SSIS , SQL Server (T-SQL) But haven't found a solution still

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.

Migrate mysql tables to existing sql database

How can I migrate mysql tables to an already existing sql database.I have tried using sql server migration assistant for mysql tool, but it migrates entire database to a new database in sql server.Is it possible to transfer mysql tables to existing sql database?
Please help
If you have MySQL workbench and you only need the table structures you can select the tables that you need then:
Right Click > Copy to clipboard > Create Statement
Then past these into your new database an excecute
you can create a linked server the target system; this way you can import the tables selecting the data into the new tables on sql server.
if you already have the DDL migrated then you can fill the tables otherwise you can create the tables while copying the data.
with little scripting you can have the SQL code needed to copy the data ready in minutes.
there are many SO posts about interacting with MySQL from SQL-Server:
Can't create linked server - sql server and mysql
SELECT * FROM Linked MySQL server
Do I have to use OpenQuery to query a MySQL Linked Server from SQL Server?
Have you tried the Import/Export Wizard from within SQL Server Management Studio - it's essentially SSIS (an ETL tool) behind the scenes. It allows you to select specific objects, do transforms and such. I'd expect you'd be able to use a standard ODBC driver.
MSSQLTips has an article that seems relevant:
https://www.mssqltips.com/sqlservertutorial/2205/mysql-to-sql-server-data-migration/

How to replicate data between tables on linked servers?

Good Day
I have created a linked server on my SQL Server to my MySQL Database. The SQL Server Database is Called Main and the Table I am looking at is called ORDR. The MySQL Linked server connection is called MySQL_Link and the table I use in there is also called ORDR. How do I replicate the data from the SQL Server ORDR Table to The MYSQL ORDR table?
Thanks

How to access remote MicroSoft SQL Server database from a stored procedure in MySQL

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.