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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DSN-Less Oracle help PLEASE!

Re: DSN-Less Oracle help PLEASE!

From: Christian J. Bauer <christian.bauer_at_passau.netsurf.de>
Date: 1998/03/26
Message-ID: <6fd64k$k56$1@einstein.pnm.net>#1/1

Darrin Smith wrote in message <6fbsma$2686_at_hector.sabre.com>...
>
>I'm used to going into ODBC32, setting up a DNS entry for MyDB, and
>using that name in my connect string. How in the world do you connect
>without a DNS name and especially over TCP\IP?

First of all, don't mix around DNS and DSN.

DNS is "Domain Name Service" and binds "NAMES" to "ADDRESSES" like "microsoft.com" to "207.46.130.138"

DSN is the "Data Source Name" that is an alias to the Server (or local) database.

Using ODBC you will deal (in most cases) with DSN. That's just an alias and has NOTHING to do with TCP/IP.

Also, using Oracle over the net you will have to do with "Service Names". That has NOTHING to do with TCP/IP, DSN or DNS. When using a "connection less" odbc setting, you must specify the Service Name. This is sometimes called the "TNSNAME" or the "LISTENER alias", which I don't think is "correct". You will define this name with the "SQL Net Easy configuration" or with a text editor in the "TNSNAMES.ORA" file.

Using SQL Net Easy (or editing TNSNAMES.ORA) you have to specify wich database (SID) and what Server (IP-ADDRESS or DNS-name) you want to address.

BTW: You need SQL*NET 2.x to connect to Oracle this way, not SQL*NET 1.x.

This Service name can be addressed in the Connection String as "DBQ=my_service_name"

So your "Connection less" string will look like that:

"Driver={Microsoft ODBC Driver for Oracle};DBQ=MyService;Uid=MyId;Pwd=MyPwd"

Your TNSNAMES.ORA would look like that:

MyService.world =
  (DESCRIPTION =
    (ADDRESS_LIST =

        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = somename.group.com)
          (Port = 1521)
        )
        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = somename.group.com)
          (Port = 1526)
        )

    )
    (CONNECT_DATA = (SID = MyDb)
    )
  )

Hope this helps

Chris

>
>All I can get from checking out Microsoft is that I need something like
>this:
>
>sConnect = "Driver={Microsoft ODBC Driver for Oracle};
>CONNECTSTRING=???????;Uid=MyId;Pwd=MyPwd"
>
>
>So what goes into the ???????? and how do I set up the ??????? to use
>it?
>
>Thanks.
>
>Darrin
>--
>Legal Warning: Anyone sending me unsolicited/commercial/junk/spam
>e-mail WILL be charged a US$500 proof-reading fee. Do NOT send
>unsolicited advertisements and do NOT add my e-mail address to your
>list(s):
>"By US Code Title 47, Sec.227(a)(2)(B), a computer/modem/printer meets
>the definition of a telephone fax machine. By Sec.227(b)(1)(C), it is
>unlawful to send any unsolicited advertisement to such equipment. By
>Sec. 227(b)(3)(C), a violation of the aforementioned Section is
>punishable by action to recover actual monetary loss, or $500,
>whichever is greater, for each violation."
>
Received on Thu Mar 26 1998 - 00:00:00 CST

Original text of this message

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