This discussion is archived
2 Replies Latest reply: Dec 13, 2013 5:10 AM by 13f5f99c-a623-4ff5-84d5-7cd042afc5bd RSS

database link to mySQL

13f5f99c-a623-4ff5-84d5-7cd042afc5bd Newbie
Currently Being Moderated

Hi everyone,

 

i try to create a database link from my oracle DB to a mySQL DB. Now i can not start the listener "gtw_listener" with "lsnrctl start gtw_listener".

Error message:

"TNS-12560: TNS:protocol adapter error

TNS-00530: Protocol adapter error"

 

Can anybody help?

 

Oracle DB Version: Oracle Database 11g     11.2.0.1.0    64bit Production

OS Version: Windows 7 SP1 64bit

 

These are my files listener.ora, tnsnames.ora, inittest.ora and mySQL-test.ini:

---------------------------------------------

# listener.ora Network Configuration File: C:\product\11.2.0\tg_2\network\admin\listener.ora

# Generated by Oracle configuration tools.

 

SID_LIST_GTW_LISTENER =

(SID_LIST =

(SID_DESC =

(ORACLE_HOME = C:\product\11.2.0\tg_2)

(SID_NAME = test)

(PROGRAM = dg4odbc)

)

)

 

GTW_LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1522))

    )

  )

 

ADR_BASE_MYSQL = C:\product\11.2.0\tg_2

 

---------------------------------------------

# tnsnames.ora Network Configuration File: C:\product\11.2.0\tg_2\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

 

test= (DESCRIPTION=

(ADDRESS=(PROTOCOL=tcp)

(HOST=hostname)

(PORT=1522)

)

(CONNECT_DATA = (SID = test)

)

(HS = OK)

)

 

---------------------------------------------

# This is a sample agent init file that contains the HS parameters that are

# needed for the Database Gateway for ODBC

 

# HINWEIS: Name des DSN muss hier angegeben werden

HS_FDS_CONNECT_INFO=test

HS_FDS_TRACE_LEVEL=0

HS_FDS_SHAREABLE_NAME=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5w.dll

HS_LANGUAGE=GERMAN_GERMANY.WE8ISO8859P15

#

# ODBC specific environment variables

#

# HINWEIS: Pfad und Name muss ggf. angepasst werden.

set ODBCINI=C:\product\11.2.0\tg_2\hs\admin\mySQLtest.ini

 

#

# Environment variables required for the non-Oracle system

#

#set HOME=C:\product\11.2.0\tg_2

---------------------------------------------

[ODBC Data Sources]

test= MySQL ODBC Driver 5.2 (32 bit)

 

[test]

Driver      = C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5w.dll

DATABASE    = mySQL_DB_name

DESCRIPTION = connection to mysql db

PORT        = 3306

SERVER      = ip to mysql server

UID         = username

PWD         = pw

CHARSET     = utf8

TRACE       = OFF

  • 1. Re: database link to mySQL
    kgronau Guru
    Currently Being Moderated

    add a space to each line in the SID section of your listener - only GTW_LISTENER and SID_LIST_GTW_LISTENER are valid commands to start at the first position in the file.

     

    In addition please remove that line from your gateway init file: HS_FDS_SHAREABLE_NAME=C:\Program Files\MySQL\Connector ODBC 5.2\myodbc5w.dll

    HS_FDS_SHAREABLE_NAME is used on Unix to specify the ODBC Driver Manager - as you're on Windows where Windoes ships a valid ODBC Driver Manager you don't need to specify that parameter.manager. In addition please remove the set ODBCINI parameter as the Windows ODBC Driver Manager uses the registry. So make sure you have created a 64bit ODBC system DSN using the 64bit MySQL ODBC driver (it has to be the 64bit ODBC driver as you're on a 64bit Windows using a 64bit DG4ODBC)

    - Klaus

  • 2. Re: database link to mySQL
    13f5f99c-a623-4ff5-84d5-7cd042afc5bd Newbie
    Currently Being Moderated

    Thank you so far for your answer.I had to start the service now with the windows services. Now the listener is running and "tns ping test" also works fine.

     

    Nachricht geändert durch 13f5f99c-a623-4ff5-84d5-7cd042afc5bd

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points