Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

create database link from oracle to mysql using odbc

Rati ToduaMar 16 2016 — edited Mar 16 2016

hello. as described i want to create db link which will allow me to see mysql tables in oracle.

but i can't create it cause i can't make my listener listen to this mysql.


i have oracle version 11g r2 64 bit. and my linux is redhat 64 bit as well.

i think, i have installed odbc successfully on linux, cause when i use command: isql -v zenoss user pass (zennos is my dsn) it lets me connect from linux and retrieve data.

i have created initzenoss.ora (initDSN.ora) in $oracle_home/hs/admin and it's parameters are:

HS_FDS_CONNECT_INFO = zenoss

HS_FDS_TRACE_LEVEL = OFF

here is my tnsnames.ora file:

ZENOSS =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 123.34.213.12)(PORT = 3306))     //i've just changed ip for security purposes

    )

    (CONNECT_DATA =

      (SERVICE_NAME = ZENOSS)

    )

  )

and here is my listener.ora file:

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = orcl.localdomain)(PORT = 1521))            // this listens to oracle database which is installed on linux for remote connections

    )

  )

LISTENER2 =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 123.34.213.12)(PORT = 3306))         //this should listen to mysql server but it doesn't...

    )

  )

SID_LIST_LISTENER2 =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = zenoss)

      (ORACLE_HOME = /opt/app/oracle/product/11.2.0/db_1)

      (PROGRAM = dg4odbc)

    )

  )

ADR_BASE_LISTENER = /opt/app/oracle

ADR_BASE_LISTENER2 = /opt/app/oracle

so why i am getting  this error when i try to lsnrctl start listener2?

Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=85.118.96.100)(PORT=3306)))

TNS-12545: Connect failed because target host or object does not exist

TNS-12560: TNS:protocol adapter error

  TNS-00515: Connect failed because target host or object does not exist

   Linux Error: 99: Cannot assign requested address

thanks...

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 13 2016
Added on Mar 16 2016
2 comments
1,978 views