Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: HS ODBC - DBLINK

Re: HS ODBC - DBLINK

From: Glen A. Stromquist <glen_stromquist_at_no_spam_yahoo.com>
Date: Mon, 20 Sep 2004 16:43:58 GMT
Message-ID: <iND3d.63718$KU5.41994@edtnps89>


cjn wrote:

> Hello:
>
> I'm trying to configure Heterogeneous Services using Generic Conectivity
> (ODBC) to connect from an ORACLE Database (Enterprise Oracle 8i 8.1.7)
> installed on Windows 2000 ) to MySQL Database (installed on Windows 2000).
>
> I followed all the steps in Oracle release note
> 114820.1 but it doesn't work.
>
>
> My tnsnames.ora looks like:
>
> hsmsql =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
> )
> (CONNECT_DATA = (SID = msql))
> (HS=OK)
> )
>
> Listener.ora is:
>
> LISTENER =
> (DESCRIPTION_LIST =
> (DESCRIPTION =
> (ADDRESS_LIST =
> (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
> )
> )
> )
>
> SID_LIST_LISTENER =
> (SID_LIST =
> (SID_DESC =
> (SID_NAME = msql)
> (ORACLE_HOME = D:\orantserv)
> (PROGRAM = hsodbc)
> )
> (SID_DESC =
> (GLOBAL_DBNAME = REFDCN)
> (ORACLE_HOME = D:\orantserv)
> (SID_NAME = REFDCN)
> )
> )
>
> and I also created a file inithsodbc (on ORACLE_HOME/hs/admin) like this:
> # This is a sample agent init file that contains the HS parameters that are
> # needed for an ODBC Agent.
>
> HS_FDS_CONNECT_INFO = msql
> HS_FDS_TRACE_LEVEL = 4
> #HS_FDS_SHAREABLE_NAME = C:\WINNT\System32\myodbc3.dll
> HS_FDS_TRACE_FILE_NAME= c:\temp\hsmsql.trc
>
> There is an ODBC System DSN (file) called msql (it works fine!)
>
> I connect to user essai
>
> I created a database link (create database link '' connect to
> <user> identified by <password> using 'hsmsql'
>
> When I try to select some data from the remote database (using SQL*PLus)
>
> select * from toto_at_msql;
>
> I got ORA-012154 : tnsnames.ora
>
> What is wrong in this configuration
>
> Thanks for help

Going strictly from somewhat foggy memory, here are a couple of suggestions...

#1 Your HS_FDS_CONNECT_INFO = should read "hsmsql" like in your tnsnames.ora

#2 I think also that your init file in \oracle_home\hs\admin should be named "initmsql.ora"

#3 If you create your database link (this is what I ended up doing) using: CREATE PUBLIC DATABASE LINK "<whatever>" USING
'(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<youhost>)(PORT=1521))(CONNECT_DATA=(SID=msql))(HS=OK))'

then you can not bother with the first two suggestions as it will bypass the tnsnames alias this way.

#4 - IIRC I think you also need global_names = FALSE set in your database init param's

hth Received on Mon Sep 20 2004 - 11:43:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US