3
I need to know how to have the data of an Oracle database in my Mysql database, a kind of view.
I do not wish to make insert
, update
nor delete
in the Oracle bank, I need only one select
of this data, to have them in my Mysql database.
I found two paths, which I’m not sure they work:
1) I have Oracle ODBC installed on my server that has Mysql, but I don’t know how to make Mysql "see" this my ODBC to create a link between the databases.
2) I have found what seems to be a good way to solve the problem: http://ftp.nchu.edu.tw/MySQL/tech-resources/articles/dbixmyserver.html
The tutorial refers to the use of a proxy server, which becomes the intermediary between Mysql database and other banks. This intermediary is the one who allows a database to give a SELECT in the other database.
I believe that the solution in item 2 really works, however, I have no knowledge in Perl development and do not know how to make the required proxy configuration to work.
Your question makes no sense, an SGBD has no way to communicate with another SGBD. The closest you are to what you intend to do is to make an exact copy from one bank to another, even if they are from different Dbms.
– Rodrigo Rigotti
No, I don’t want a static copy. I want a table or view that allows me to see in Mysql the same Oracle data, even if it is changed.
– João
A view is a form of data visualization within a DBMS, it does not work to view data from another DBMS. Why you want to view Oracle data in Mysql, after all?
– Rodrigo Rigotti
I have the data I need for a web application in an Oracle database (and the data changes in this database). However, my web application uses Mysql.
– João
Then you need to create two connections - a Mysql and an Oracle -, pull the data from both databases and work with them in your application.
– Rodrigo Rigotti
So the fact is that I want my application to query only in Mysql. That’s why I need the data there.
– João
Then create a routine to replicate Oracle data in Mysql. But nothing you want will be possible if in no time you connect with Oracle.
– Rodrigo Rigotti
So, from Oracle to Oracle there are ODBC connections. I would like to do the same thing, but from Oracle to Mysql.
– João
No, there is not the same thing from Oracle to Mysql.
– Renato Tavares
The only way would be to create a Trigger on the same Oracle?
– João
If the application is "Web" (an application communicating with a server, or a server communicating with another server) the only way I see of doing such a process is to create a "Webservice" (for example a json) that would migrate the data as needed, the Webservice structure will have to work equivalent to a MODEL and use HTTP requests to receive commands.
– Guilherme Nascimento
Yeah, but from Oracle to Mysql I can do it. That is, I can through Oracle see tables I have in Mysql through the Mysql ODBC Connector.
– João
@Rodrigorigotti what he wants exists yes, is a resource called Database Link (Oracle) or Linked Server (SQL Server). For web development it doesn’t really make much sense to have more than one DB chatting with another, but in other case it is completely possible.
– gmsantos
@John one option could be the Federated engine, however will not suit you as it only works between mysql-mysql
– gmsantos
@gmsantos cool to know this, I didn’t really know. :)
– Rodrigo Rigotti
Maybe a communication via XML the BD Oracle saves an xml that Mysql reads , It remains to know how dynamic is the source BD , direct link I confess that never heard.
– Motta