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: generic connectivity ms-sql

Re: generic connectivity ms-sql

From: Anton Buijs <remove_aammbuijs_at_xs4all.nl>
Date: Sun, 20 Jul 2003 10:38:13 +0200
Message-ID: <3f1a54d7$0$49099$e4fe514c@news.xs4all.nl>

Rainer Hahnekamp <rainer.hahnekamp_at_aon.at> schreef in berichtnieuws 3f19dae7$0$32068$91cee783_at_newsreader01.highway.telekom.at...
| Hello everybody,
|
| following situation: I have an installed Oracle 9i and SQL Server 2K on
only
| one machine (test purpose). Both are installed with default options. I
want
| to create a database link in Oracle to a database called MKS at the SQL
| Server.
| Therefore I installed the Heterogeneous Service Data Directory according
to
| the documentation and set up the files tnsnames.ora, initMKS.ora and
| listener.ora:
|
| tnsnames.ora
| MKS = (Description =
| (address = (protocol=tcp) (host=localhost) (port=1521))
| (connect_data = (sid=MKS))(HS=ok))
|
| listener.ora
| LISTENER =
| (ADDRESS_LIST=
| (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
| (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
| )
| sid_list_listener=
| (sid_list =
| (sid_desc =
| (program=hsolesql) (sid_name=MKS)
| (oracle_home=c:\oracle\ora92)
| )
| )
|
| initMKS.ora
| HS_FDS_CONNECT_INFO = "UDLFILE=c:\oracle\ora92\hs\admin\mks.udl"
| HS_FDS_TRACE_LEVEL = <trace_level>
|
| mks.udl has been tested and seems to be correct.
| After executing "create database link mks using 'MKS';" and "select * from
| Picks_at_mks;" I got the following error:
| ORA-12154: TNS. Service Name could not be resolved (translated from
german)
|
| As you propably can see I am a complete newbie to Oracle and have nearly
no
| experience but please help me.
|
| Greetings,
| -Rainer Hahnekamp
|
|

Where are tnsnames.ora and listener.ora? The error means tnsnames.ora can't be found, the entry can't be found in the file or the entry has syntax errors.
The default locaiton is in the Oracle Home subdir /network/admin. Unles you set the Registry key \\HKLM\Software\Oracle\Home0\TNS_ADMIN to another directory (home1, home2... use the appropriate one) And don't forget to start the listener service (is probable done automatically). Restart it after changing listener.ora I've never worked with HS so its new for me that a connection with SQL Server requires an initMKS.ora file (that's normally the parameter file for an Oracle database). But should you not replace "<trace_level>" with OFF, or ADMIN or something like that? Or is that what you did but gave us a generic example? Received on Sun Jul 20 2003 - 03:38:13 CDT

Original text of this message

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