Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Oracle / Oracle Server / September 2004

Tip: Looking for answers? Try searching our database.

HS ODBC -  DBLINK

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cjn - 20 Sep 2004 16:56 GMT
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@msql;

I got ORA-012154 : tnsnames.ora

What is wrong in this configuration

Thanks for help
Glen A. Stromquist - 20 Sep 2004 17:43 GMT
> Hello:
>
[quoted text clipped - 66 lines]
>
> 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
cjn - 21 Sep 2004 08:45 GMT
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@msql;
select * from toto@msql
                  *
ERREUR à la ligne 1 :
ORA-28500: la connexion d'ORACLE à un système non Oracle a retourné ce message

[Generic Connectivity Using ODBC][H006] The init parameter
<HS_FDS_CONNECT_INFO> is not set. Please set it in init<orasid>.ora file.
ORA-02063: précédant 2 lines de MSQL

What is wrong ?

Thank you

> > Hello:
> >
[quoted text clipped - 87 lines]
>
> hth
Niall Litchfield - 21 Sep 2004 14:28 GMT
> Hello Glen,
>
[quoted text clipped - 24 lines]
>
> What is wrong ?

HS_FDS_CONNECT_INFO is not set!

initmsql.ora should include at least the following line

HS_FDS_CONNECT_INFO=MSQL
assuming that your DSN is called MSQL.

Niall
cjn - 22 Sep 2004 08:59 GMT
Hello Niall,
 
  That's what I've made, of course : I have created an initmsql.ora
and set HS_FDS_CONNECT_info = msql. My DSN calls msql too. It's very
strange...

Have someone one idea please ?

Thanks

> > Hello Glen,
> >
[quoted text clipped - 38 lines]
>
> Niall
Glen A Stromquist - 22 Sep 2004 15:23 GMT
> Hello Niall,
>  
[quoted text clipped - 3 lines]
>
> Have someone one idea please ?

Double check everything you've done and compare it to the steps here:
http://download-west.oracle.com/docs/cd/A87860_01/doc/network.817/a76933/advcfg.
htm#474076

or on Niall's link, if either of those don't work log an iTar with Oracle.

hth
cjn - 23 Sep 2004 18:04 GMT
Hello,

Finally, I succeed to get this message bu it doesn't work :

drop public database link msql;

CREATE PUBLIC DATABASE LINK msql connect to "admin" identified by
"admin"
  using '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)
   (PORT=1521))(CONNECT_DATA=(SID=msql))(HS=OK))';

select * from toto@msql;

ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this
message:
[Generic Connectivity Using ODBC][S1000] [9013]General error in
nvITrans_BeginT - rc = -1. Please
refer to the log file for details.
ORA-02063: preceding 2 lines from MSQL

The log files doesn't tell more.

Thanks for help.

> > Hello Niall,
> >  
[quoted text clipped - 9 lines]
>
> hth
cjn - 24 Sep 2004 07:22 GMT
Hello,

I check everything, and now I got this message :

SQL>
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))';

Database link created.

SQL>
SQL> select * from toto@msql;
select * from toto@msql
             *
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this
message:
[Generic Connectivity Using ODBC][S1000] [9013]General error in
nvITrans_BeginT - rc = -1. Please
refer to the log file for details.
ORA-02063: preceding 2 lines from MSQL

?????

> > Hello Niall,
> >  
[quoted text clipped - 9 lines]
>
> hth
cjn - 24 Sep 2004 07:22 GMT
Hello,

I check everything, and now I got this message :

SQL>
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))';

Database link created.

SQL>
SQL> select * from toto@msql;
select * from toto@msql
             *
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this
message:
[Generic Connectivity Using ODBC][S1000] [9013]General error in
nvITrans_BeginT - rc = -1. Please
refer to the log file for details.
ORA-02063: preceding 2 lines from MSQL

?????

> > Hello Niall,
> >  
[quoted text clipped - 9 lines]
>
> hth
Glen A Stromquist - 24 Sep 2004 15:28 GMT
> Hello,
>
[quoted text clipped - 21 lines]
>
> ?????

I can't help you here, except to say that sometimes tables in HS linked
databases do not always behave like "normal" db linked tables. IIRC in
my limited experience with this I could not do a select * from a table,
but if I just named all of the columns it worked.  I can't rememeber if
the error was the same as yours or not. You might want to try metalink
forums and see if someone from Oracle can explain this better.
Niall Litchfield - 20 Sep 2004 22:23 GMT
Hi anne-marie

really i'm supposed to be going to bed not reading cdos but I do have a
relaticely simple howto on my site for generic connectivity if you wish to
compare what you have done with that you are more than welcome.

Signature

Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com

> Hello:
>
[quoted text clipped - 67 lines]
>
> Thanks for help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.