Viewing Oracle database data via MySQL

3

I need to know how do I get the data from an Oracle database in my MySQL database, a kind of view .

I do not want to do insert , update nor delete in the Oracle database, I only need%% of this data to have them in my MySQL database.

I found two paths, which I'm not sure will work:

1) I have Oracle ODBC installed on my server that has MySQL, but I do not know how to make MySQL "see" my ODBC to create a link between the databases. >

2) I found what seems to be a good way to solve the problem: link

The tutorial references the use of a Proxy server, which becomes the intermediary between MySQL database and other banks. This intermediary is who allows one database to give a SELECT on the other database.

I think the solution in item 2 really works, but I do not have any knowledge of Perl development and I do not know how to make the proxy configuration required to work.

    
asked by anonymous 18.12.2014 / 16:52

3 answers

3

I just used it in reverse, making oracle access the tables in mysql through a DBLINK [ link

Would not you rather do this? According to what changes in oracle, you inside oracle update in mysql.

I've never set up, but in order to access a dblink you will have access to: table @ dbLink name, in case if you have a dblink configured in oracle for mysql, you can already access the tables.

Accessing: [ link

    
13.03.2015 / 21:26
0

It is possible to use Federated Tables via Perl DBIx :: MyServer proxy

The link you submitted (which I cited as a reference) coincidentally is the best reference that exists to do this, so the best option and even study

    
15.06.2015 / 12:35
-1
$ora_user = "usuario";
$ora_senha = "senha";
$ora_bd = "(DESCRIPTION=
      (ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=TCP)
          (HOST=192.168.xxx.xxx)(PORT=1521)
        )
      )
      (CONNECT_DATA=(SERVICE_NAME=yyyyy))
 )";

if ($ora_conexao = oci_connect($ora_user,$ora_senha, $ora_bd)){
    echo 'Conexão bem sucedida';
}else{
    echo 'Conexão falhada';
}

select

$stid = oci_parse($ora_conexao, 'SELECT A.MATRICULA, 
A.NOME_FUNCIONARIO, A.APELIDO FROM VIEW_X A');
oci_execute($stid);


while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
    //echo ....
}
    
20.04.2018 / 14:33