This discussion is archived
13 Replies Latest reply: Jan 7, 2013 4:50 AM by mkirtley-Oracle RSS

Issue trying to connect oracle to mysql database

983261 Newbie
Currently Being Moderated
Hi there,

I need some help with the configuration, i'm trying to connect a windows oracle 11g r2 to a linux mysql 5.5, but i'm having a lot of issue, here i will put the configuration.
Thanks for everyone how will try to help me!

here is my tnsname.ora:
# tnsnames.ora Network Configuration File: C:\app\Administrador\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = gabriel-103eff2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
ms_connection =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=gabriel-103eff2)(PORT=1521))
(CONNECT_DATA=(SID=ms))
(HS=OK)
)



here is my listener.ora:

# listener.ora Network Configuration File: C:\app\Administrador\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\Administrador\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\Administrador\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC=
(SID_NAME=ms)
(ORACLE_HOME=C:\app\Administrador\product\11.2.0\dbhome_1)
(PROGRAM=dg4odbc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = gabriel-103eff2)(PORT = 1521))
)
)

ADR_BASE_LISTENER = C:\app\Administrador



here is the init*.ora:

# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC

#
# HS init parameters
#
HS_FDS_CONNECT_INFO = ms
HS_FDS_TRACE_LEVEL = debug


#
# Environment variables required for the non-Oracle system
#
#set <envvar>=<value>



here is the debug:



Oracle Corporation --- SEXTA-FEIRA JAN 04 2013 17:18:13.390


Heterogeneous Agent Release
11.2.0.1.0




Oracle Corporation --- SEXTA-FEIRA JAN 04 2013 17:18:13.390

Version 11.2.0.1.0

Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "debug"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
setting HS_IDLE_TIMEOUT to default of 0
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "UCS2"
setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
setting HS_FDS_DATE_MAPPING to default of "DATE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 32 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "ms"
Product-Info:
Port Rls/Upd:1/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:ms
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=178
HOCXU_DRV_NCHAR=1000
HOCXU_DB_CSET=873
HOCXU_SEM_VER=112000
Entered hgolofn at 2013/01/04-17:18:14
Exiting hgolofn, rc=0 at 2013/01/04-17:18:14
HOSGIP for "HS_OPEN_CURSORS" returned "50"
HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
Invalid value of 32 given for HS_FDS_SQLLEN_INTERPRETATION
treat_SQLLEN_as_compiled = 1
Exiting hgoinit, rc=0 at 2013/01/04-17:18:14
Entered hgolgon at 2013/01/04-17:18:14
reco:0, name:SYSTEM, tflag:0
Entered hgosuec at 2013/01/04-17:18:14
Exiting hgosuec, rc=0 at 2013/01/04-17:18:14
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using SYSTEM as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2013/01/04-17:18:14
HS_FDS_CONNECT_INFO = "msodbc"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2013/01/04-17:18:14
dsn:msodbc, name:SYSTEM
optn:
Entered hgocip at 2013/01/04-17:18:14
dsn:msodbc
Exiting hgocip, rc=0 at 2013/01/04-17:18:14
Exiting hgogenconstr, rc=0 at 2013/01/04-17:18:14
Entered hgopoer at 2013/01/04-17:18:14
hgopoer, line 233: got native error 0 and sqlstate IM002; message follows...
[Microsoft][ODBC Driver Manager] Nome da fonte de dados não encontrado e nenhum driver padrão especificado {IM002}
Exiting hgopoer, rc=0 at 2013/01/04-17:18:14
hgocont, line 2753: calling SqlDriverConnect got sqlstate IM002
Exiting hgocont, rc=28500 at 2013/01/04-17:18:15 with error ptr FILE:hgocont.c LINE:2773 ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2013/01/04-17:18:15 with error ptr FILE:hgolgon.c LINE:781 ID:Calling hgocont
Entered hgoexit at 2013/01/04-17:18:15
Exiting hgoexit, rc=0

______________________________________________________

when i use tnsping ms_connection


C:\Documents and Settings\Administrador>tnsping ms_connection

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 07-JAN-2
013 09:04:29

Copyright (c) 1997, 2010, Oracle. All rights reserved.

Arquivos de parÔmetros usados:


Usado o adaptador TNSNAMES para resolver o apelido
Tentativa de contatar (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=gabriel-103eff2
)(PORT=1521)) (CONNECT_DATA=(SID=ms)) (HS=OK))
OK (0 ms)





Thank you so much!!!
  • 1. Re: Issue trying to connect oracle to mysql database
    mkirtley-Oracle Expert
    Currently Being Moderated
    Hi,
    The error in your gateway trace file -

    [Microsoft][ODBC Driver Manager] Nome da fonte de dados não encontrado e nenhum driver padrão especificado {IM002}

    translates as -

    Data Source Name not found and no default driver specified

    This means you do not have a system DSn defined on the Windows machine called 'ms' which uses a MySQL ODBC driver to connect to the MySQL database on your Linux machine.
    The System DSN to use is defined by the parameter -

    HS_FDS_CONNECT_INFO = ms

    So, you need to do the following -

    - install a Windows MySQL ODBC driver
    - define a System DSN whichuses this driver to connect to your MYSQL on Linux
    - use this DSN as the parameter HS_FDS_CONNECT_INFO

    You need to make sure the DSN can connect to MYSQL without Oracle involved before DG4ODBC can also make a connection.

    Regards,
    Mike
  • 2. Re: Issue trying to connect oracle to mysql database
    983261 Newbie
    Currently Being Moderated
    Hi, mkirtley thank you so much for helping me, i already have installed the MySQL Connector/ODBC Data Source Configuration, put in Connection Parameters the name "ms" and i tried to connect using the button test, and everything is fine.

    Do you have another solution?

    Thanks again!
  • 3. Re: Issue trying to connect oracle to mysql database
    kgronau Guru
    Currently Being Moderated
    Is DG4ODBC installed on a 64bit Windows? What's the word size of the ODBC driver you installed?

    Could you please post the export of the registry key:
    HKEY_LOCAl_MACHINE/software/ODBC/ODBC.INI?
    - Klaus
  • 4. Re: Issue trying to connect oracle to mysql database
    983261 Newbie
    Currently Being Moderated
    Hi Klaus,

    DG40DBC is installed in windows XP 32bit, tje DG4ODBC its installed in the oracle 11g EE r2, automatic right?

    The ODBC driver i had installed was mysql-connector-odbc-5.2.2-win32.exe


    Here is the registry key:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC]

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI]

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC File DSN]
    "DefaultDSNDir"="C:\\Arquivos de programas\\Arquivos comuns\\ODBC\\Data Sources"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI]

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Conversor de página de código MS]
    "Translator"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "Setup"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "UsageCount"=dword:00000002

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver da Microsoft para arquivos texto (*.txt; *.csv)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odtext32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.,*.asc,*.csv,*.tab,*.txt,*.csv"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver do Microsoft Access (*.mdb)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="2"
    "FileExtns"="*.mdb"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver do Microsoft dBase (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\oddbse32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.ndx,*.mdx"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver do Microsoft Excel(*.xls)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odexl32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.xls"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver do Microsoft Paradox (*.db )]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odpdx32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.db"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Driver para o Microsoft Visual FoxPro]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Access Driver (*.mdb)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="2"
    "FileExtns"="*.mdb"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Access-Treiber (*.mdb)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="2"
    "FileExtns"="*.mdb"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft dBase Driver (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\oddbse32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.ndx,*.mdx"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft dBase VFP Driver (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft dBase-Treiber (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\oddbse32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.ndx,*.mdx"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Excel Driver (*.xls)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odexl32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.xls"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Excel-Treiber (*.xls)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odexl32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.xls"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft FoxPro VFP Driver (*.dbf)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft ODBC for Oracle]
    "UsageCount"=dword:00000001
    "Driver"="C:\\WINDOWS\\system32\\msorcl32.dll"
    "Setup"="C:\\WINDOWS\\system32\\msorcl32.dll"
    "SQLLevel"="1"
    "FileUsage"="0"
    "DriverODBCVer"="02.50"
    "ConnectFunctions"="YYY"
    "APILevel"="1"
    "CpTimeout"="120"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Paradox Driver (*.db )]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odpdx32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.db"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Paradox-Treiber (*.db )]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odpdx32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.db"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Text Driver (*.txt; *.csv)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odtext32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.,*.asc,*.csv,*.tab,*.txt,*.csv"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Text-Treiber (*.txt; *.csv)]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\odbcjt32.dll"
    "Setup"="C:\\WINDOWS\\system32\\odtext32.dll"
    "APILevel"="1"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.,*.asc,*.csv,*.tab,*.txt,*.csv"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Visual FoxPro Driver]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Microsoft Visual FoxPro-Treiber]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "Setup"="C:\\WINDOWS\\system32\\vfpodbc.dll"
    "APILevel"="0"
    "ConnectFunctions"="YYN"
    "DriverODBCVer"="02.50"
    "FileUsage"="1"
    "FileExtns"="*.dbf,*.cdx,*.idx,*.fpt"
    "SQLLevel"="0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\MS Code Page Translator]
    "Translator"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "Setup"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "UsageCount"=dword:00000002

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\MS Code Page-Übersetzer]
    "Translator"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "Setup"="C:\\WINDOWS\\system32\\MSCPXL32.dll"
    "UsageCount"=dword:00000002

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\MySQL ODBC 5.2w Driver]
    "UsageCount"=dword:00000001
    "Driver"="C:\\Arquivos de programas\\MySQL\\Connector ODBC 5.2\\Unicode\\myodbc5w.dll"
    "Setup"="C:\\Arquivos de programas\\MySQL\\Connector ODBC 5.2\\Unicode\\myodbc5S.dll"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Core]
    "UsageCount"=dword:00000001

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers]
    "SQL Server"="Installed"
    "Microsoft Access Driver (*.mdb)"="Installed"
    "Microsoft Text Driver (*.txt; *.csv)"="Installed"
    "Microsoft Excel Driver (*.xls)"="Installed"
    "Microsoft dBase Driver (*.dbf)"="Installed"
    "Microsoft Paradox Driver (*.db )"="Installed"
    "Microsoft Visual FoxPro Driver"="Installed"
    "Microsoft FoxPro VFP Driver (*.dbf)"="Installed"
    "Microsoft dBase VFP Driver (*.dbf)"="Installed"
    "Microsoft Access-Treiber (*.mdb)"="Installed"
    "Microsoft Text-Treiber (*.txt; *.csv)"="Installed"
    "Microsoft Excel-Treiber (*.xls)"="Installed"
    "Microsoft dBase-Treiber (*.dbf)"="Installed"
    "Microsoft Paradox-Treiber (*.db )"="Installed"
    "Microsoft Visual FoxPro-Treiber"="Installed"
    "Driver do Microsoft Access (*.mdb)"="Installed"
    "Driver da Microsoft para arquivos texto (*.txt; *.csv)"="Installed"
    "Driver do Microsoft Excel(*.xls)"="Installed"
    "Driver do Microsoft dBase (*.dbf)"="Installed"
    "Driver do Microsoft Paradox (*.db )"="Installed"
    "Driver para o Microsoft Visual FoxPro"="Installed"
    "Microsoft ODBC for Oracle"="Installed"
    "Oracle em OraDb11g_home1"="Installed"
    "MySQL ODBC 5.2w Driver"="Installed"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Translators]
    "MS Code Page Translator"="Installed"
    "MS Code Page-Übersetzer"="Installed"
    "Conversor de página de código MS"="Installed"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\Oracle em OraDb11g_home1]
    "APILevel"="1"
    "CPTimeout"="60"
    "ConnectFunctions"="YYY"
    "Driver"="C:\\app\\Administrador\\product\\11.2.0\\dbhome_1\\BIN\\SQORA32.DLL"
    "DriverODBCVer"="03.51"
    "FileUsage"="0"
    "Setup"="C:\\app\\Administrador\\product\\11.2.0\\dbhome_1\\BIN\\SQORAS32.DLL"
    "SQLLevel"="1"

    [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\SQL Server]
    "UsageCount"=dword:00000002
    "Driver"="C:\\WINDOWS\\system32\\SQLSRV32.dll"
    "Setup"="C:\\WINDOWS\\system32\\sqlsrv32.dll"
    "SQLLevel"="1"
    "FileUsage"="0"
    "DriverODBCVer"="03.50"
    "ConnectFunctions"="YYY"
    "APILevel"="2"
    "CPTimeout"="60"

    Thanks Klau!

    Edited by: 980258 on 07/01/2013 03:38
  • 5. Re: Issue trying to connect oracle to mysql database
    983261 Newbie
    Currently Being Moderated
    Mike,

    - define a System DSN whichuses this driver to connect to your MYSQL on Linux

    What do you want to say with this? I dont understand! Thank you so much guys!
  • 6. Re: Issue trying to connect oracle to mysql database
    mkirtley-Oracle Expert
    Currently Being Moderated
    Hi,
    You said -

    here is the init*.ora:

    # This is a sample agent init file that contains the HS parameters that are
    # needed for the Database Gateway for ODBC

    #
    # HS init parameters
    #
    HS_FDS_CONNECT_INFO = ms
    HS_FDS_TRACE_LEVEL = debug

    #
    # Environment variables required for the non-Oracle system
    #
    #set <envvar>=<value>

    - what is the actual name of the init*.ora file and is it in the directory C:\app\Administrador\product\11.2.0\dbhome_1\hs\admin ?
    From the configuration information it shoul dbe called initms.ora.
    Are you using a different file because the trace also has -

    HS_FDS_CONNECT_INFO = "msodbc"

    whereas you in the init*.ora file you have -

    HS_FDS_CONNECT_INFO = ms

    The trace shows it is looking for a dsn called 'msodbc' and not 'ms'.

    Regards,
    Mike
  • 7. Re: Issue trying to connect oracle to mysql database
    mkirtley-Oracle Expert
    Currently Being Moderated
    Hi,
    To answer the question -

    - define a System DSN whichuses this driver to connect to your MYSQL on Linux

    - it looks like you have already done this using the Windows ODBC Administrator but it must be a System DSN and not a User DSN.

    AsI said in my last update from looking at the trace again it shows that the connection is looking for a DSN called 'msodbc' whereas you defined theDSN as 'ms' in the gateway init*.ora file that you put in the thread.

    Regards,
    Mike
  • 8. Re: Issue trying to connect oracle to mysql database
    kgronau Guru
    Currently Being Moderated
    As Mike said a couple of times, you need to define a SYSTEM DSN, not a user DSN. The reason is that DG4ODBC is spawned by the Oracle Listener and the listener is running by default in the local system account. So when you define an ODBC User DSN it won't be visible to to DG4ODBC - so please make sure you define a SYSTEM DSN and specify the name of the DSN in the gateway config file using HS_FDS_CONNECT_INFO.
    - Klaus
  • 9. Re: Issue trying to connect oracle to mysql database
    983261 Newbie
    Currently Being Moderated
    Ok i will check it thank guys

    later i will post the result.
  • 10. Re: Issue trying to connect oracle to mysql database
    kgronau Guru
    Currently Being Moderated
    There's no need to change the gateway init file. The gateway init file name depends on the SID used for the gateway service in the gateway config file.

    In your listener you have: (SID_NAME=ms)
    So the name of the gateway init file has to be initms.ora to fulfill the init<SID>.ora requirement.

    Really just make sure you define an ODBC SYSTEm DSN in the ODBC Administrator (using any name you want, for example ms to match the SID) and once you checked the connectivity, then make sure the HS_FDS_CONNECT_INFO parameter has the correct name of the system dsn - in my example where I suggested to use the same ODBC DSN name as the SID, then set it to ms.

    - Klaus
  • 11. Re: Issue trying to connect oracle to mysql database
    mkirtley-Oracle Expert
    Currently Being Moderated
    Hi,
    No, you can leave it as initms.ora as this is how it is referred to in the listener.ora and tnsnames.ora configuration.
    JHowver, you need to check the parameter -

    HS_FDS_CONNECT_INFO

    in initms.ora.
    You said it was -

    HS_FDS_CONNECT_INFO = ms

    but the trace file you posted showed a connection attempt to a DSN called 'msodbc' -

    Entered hgocont at 2013/01/04-17:18:14
    HS_FDS_CONNECT_INFO = "msodbc"
    RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
    Entered hgogenconstr at 2013/01/04-17:18:14
    dsn:msodbc, name:SYSTEM
    optn:
    Entered hgocip at 2013/01/04-17:18:14
    dsn:msodbc

    So, it looks like you are referring to a gateway init<sid>.ora file that has the parameter -

    HS_FDS_CONNECT_INFO = msodbc

    Check the initms.ora file and also the tnsnames.ora entry that you used to create the database link used in the select statement.

    Make sure that initms.ora has -

    HS_FDS_CONNECT_INFO = ms

    - that the 'create database link...' used the tnsnames.ora entry 'ms_connection'.

    Regards,
    Mike
  • 12. Re: Issue trying to connect oracle to mysql database
    983261 Newbie
    Currently Being Moderated
    Klaus and Mike Thank you so much!!! Its now WORKING :)

    just a doubt why in oracle EE we have 2 path with all this configurations like *.ora.

    In ...\hs\admin
    And NETWORK\ADMIN

    I was confused about that, and another problem was in windows ODBC i was putting in user DNS not in system DNS....

    Thanks again!!!! :)
  • 13. Re: Issue trying to connect oracle to mysql database
    mkirtley-Oracle Expert
    Currently Being Moderated
    +Hi,
    Glad you got it working.
    In ...hs\admin you will find examples for the configuration files but then the actual listener and tnsnames files used for the connection need to be in the ...\network\admin directory.
    The gateway init<sid>.ora should stay in the directory ...\hs\admin.

    Regards,
    Mike

Legend

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