Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: HS ODBC - DBLINK
Hello Glen,
I followed your suggestions :
a) I set global_names=false in my initrefdc.ora b) I rename hs/admin/inithsmqsl.ora to /hs/admin/initmsql.ora c) in my initmsql.ora I set HS_FDS_CONNECT_INFO = hsmsql d) I create a public database link as you tell me to bypass tnsnames.ora
I got the following error :
SQL> CREATE PUBLIC DATABASE LINK msql connect to "admin" identified by "admin"
2 using '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost) 3 (PORT=1521))(CONNECT_DATA=(SID=msql))(HS=OK))';
Lien de base de données créé.
SQL>
SQL> select * from toto_at_msql;
select * from toto_at_msql
*
What is wrong ?
Thank you
"Glen A. Stromquist" <glen_stromquist_at_no_spam_yahoo.com> wrote in message news:<iND3d.63718$KU5.41994_at_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 Tue Sep 21 2004 - 02:45:23 CDT